Here is what I've been fighting with and has been causing me great frustration: java.sql.SQLException: ORA-01555: snapshot too old: rollback segment number 1 with name "PURGERBS1" too small The segment is set right after obtaining the connection using oracle-specific SQL
What this means is that the rollback segment is too small for the queries I am running on the database (we're copying blobs...). The code is using straight SQL on a connection to an oracle DB obtained from the weblogic EJB container.
We can live with only part of the data being actually treated because we'll get an error and it's stil better than nothing (we are cloning data basically)
Ok... easy then I'll just mark the method where all this is done as NotSupported in the deployment file... still won't work. Oh... but that's because Oracle only support Read Commited and Serializable ! Duh... thanks for making me believe I could make a bean method work outside of transactions !
Ok... so I'll try to set the connection isolation... of course I can't because I can't set it to None and because the container will just ignore it anyway I think
Next idea is to make the bean method handle the transaction and commit every so many queries, but I can't get a UserTransaction object unless the whole bean is made BMT which I do not want to do.
Humm.. I'm sure this is bad but perhaps I can just call commit() on the connection object I get from the container. Surprise surprise... it doesn't shout or yell but it crashes the same way on a different rollback segment... X-files as far as I'm concerned
I've run out of ideas so I will just un-optimize the code and get a new connection and statement for every add and remove I make.
Or maybe I'm just suffering from the sizzling heat in Paris and can't think straight ?
Posted by pgirolami76 at June 26, 2003 01:57 PM | TrackBackThere are three situations that can cause the ORA-01555 error:
- Insufficient number of small-sized rollback segments
- A rollback segment corruption that prevents a consistent read requested by the query
- A fetch across commits while your cursor is open
query me if you need additional information ...
interesting info about car rentals
Posted by: Valley Car at July 22, 2004 03:19 PMinteresting info
Posted by: Shannon Valtrex at July 25, 2004 04:13 PMinteresting info
Posted by: Shannon Fioricet at July 26, 2004 08:54 AMinteresting info
Posted by: Vilgelm Celebrex at August 2, 2004 09:08 AMinteresting info
Posted by: Vilgelm Pala at August 7, 2004 09:32 AM