Oracle Support already has a document that covers this error and the many different causes and solutions for it - Master Note for ORA-1555 Errors (Doc ID 1307334.1), however none of those seemed to have been the cause for the issue in our case.
This was the stack trace we were seeing...
Exception
Caused by: java.io.IOException : ORA-01555: snapshot too old: rollback segment number with name "" too small
ORA-22924: snapshot too old
at oracle.jdbc.driver.OracleClobReader.needChars(OracleClobReader.java:252)
at oracle.jdbc.driver.OracleClobReader.read(OracleClobReader.java:192)
at java.io.BufferedReader.fill(BufferedReader.java:161)
at java.io.BufferedReader.read(BufferedReader.java:182)
...
Caused by: java.sql.SQLException : ORA-01555: snapshot too old: rollback segment number with name "" too small
ORA-22924: snapshot too old
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494)
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:441)
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:436)
at oracle.jdbc.driver.T4C8TTILob.processError(T4C8TTILob.java:758)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:623)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:252)
at oracle.jdbc.driver.T4C8TTIClob.read(T4C8TTIClob.java:249)
at oracle.jdbc.driver.T4CConnection.getChars(T4CConnection.java:3954)
at oracle.sql.CLOB.getChars(CLOB.java:448)
at oracle.jdbc.driver.OracleClobReader.needChars(OracleClobReader.java:235)
at oracle.jdbc.driver.OracleClobReader.read(OracleClobReader.java:192)
at java.io.BufferedReader.fill(BufferedReader.java:161)
at java.io.BufferedReader.read(BufferedReader.java:182)
...
So the issue had something to do with CLOBs. After much investigation and collaboration we received some advise about removing the cache option from the CLOB column on the table that we knew was causing this issue.
The cache option can be checked with the following query...
SQL
SELECT cache, logging
FROM dba_lobs
WHERE table_name = 'your_table';
Originally this was set to YES in our case. To disable/remove the cache option, the following SQL was used...
SQL
ALTER TABLE your_table
MODIFY LOB (your_clob_column) (NOCACHE LOGGING);
After this statement was executed the cache option was disabled. In our case this made all of the ORA-01555 errors disappear. If it doesn't help you, refer to the Oracle support note mentioned at the start of this post.
-i