Skip to Main Content
  • Questions
  • Intermittant ORA-08103: object no longer exists

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Vignesh.

Asked: September 21, 2016 - 10:51 am UTC

Last updated: September 22, 2016 - 7:05 pm UTC

Version: 12.1.0.2

Viewed 10K+ times! This question is

You Asked

In a batch job (in java), I am getting the below error details while reading the data (in a batch job). And this error is intermittant with one table on first run and in later runs the table keeps on changing. Before every job run, i will truncate the output table using below one to save some time on deletion.

TRUNCATE TABLE <table> DROP STORAGE;

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_75]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_75]
at java.lang.Thread.run(Thread.java:745) [?:1.7.0_75]
Caused by: java.sql.SQLException: ORA-08103: object no longer exists

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450) ~[ojdbc7.jar:12.1.0.2.0]
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399) ~[ojdbc7.jar:12.1.0.2.0]
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1059) ~[ojdbc7.jar:12.1.0.2.0]
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:522) ~[ojdbc7.jar:12.1.0.2.0]
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257) ~[ojdbc7.jar:12.1.0.2.0]
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:587) ~[ojdbc7.jar:12.1.0.2.0]
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:225) ~[ojdbc7.jar:12.1.0.2.0]
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:53) ~[ojdbc7.jar:12.1.0.2.0]
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:774) ~[ojdbc7.jar:12.1.0.2.0]
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:925) ~[ojdbc7.jar:12.1.0.2.0]
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1111) ~[ojdbc7.jar:12.1.0.2.0]
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:4798) ~[ojdbc7.jar:12.1.0.2.0]
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:4845) ~[ojdbc7.jar:12.1.0.2.0]
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1501) ~[ojdbc7.jar:12.1.0.2.0]

========================

Alert log – has nothing, below is the content
Wed Sep 07 22:00:00 2016
Setting Resource Manager plan SCHEDULER[0x4444]:DEFAULT_MAINTENANCE_PLAN via scheduler window
Setting Resource Manager plan DEFAULT_MAINTENANCE_PLAN via parameter
Thu Sep 08 10:25:49 2016
Thread 1 advanced to log sequence 582 (LGWR switch)
Current log# 3 seq# 582 mem# 0: /db01/oracle/oradata/pmp1212a/G3L1pmp1212a.rdo


--No block corruptions
SELECT DISTINCT owner, segment_name
FROM v$database_block_corruption dbc
JOIN dba_extents e ON dbc.file# = e.file_id AND dbc.block# BETWEEN e.block_id and e.block_id+e.blocks-1
ORDER BY 1,2;SQL> SQL> SQL> 2 3 4

no rows selected
==============

and Connor said...

Check out this blog post

https://connormcdonald.wordpress.com/2016/05/19/a-cool-thing-with-exchange-partition-part-1/

Its on exchange partition, but the concept is the same. You have a running query in another session, when you do the truncate command. So when it goes to read the data, it is no longer there.

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Vignesh Jayaprakash, September 22, 2016 - 7:57 am UTC

Thanks for the answer.

But here what I am doing is, truncating the table first, after that this table will be populated with the data (by the batch job) and then the read happens (for the inserted data ),
which means Truncation and Read are -not- happening in parallel.

Connor McDonald
September 22, 2016 - 7:05 pm UTC

That your program has a reference to:

"java.util.concurrent.ThreadPoolExecutor.runWorker"

suggests to me that while you think things might not be occurring in parallel, they must be in some way.