05-11-10, 20:48 #1Registered User
- Join Date
- Jun 2009
In the PRODUCTION enviornment, we are getting ORA-01591 errors in a weblogic cluster enviornment in two different places in the case of inserts to the database.
We use hibernate as ORM tool and weblogic v 9.2.3 and oracle database 10g.
These errors happen now and then during inserts of high volume of records - the insert logic/path is same for all the inserts though.
These errors are NOT reproducible in non-cluster SQA/testing enviornment for the SAME inserts with the SAME data (which are failing in the production enviornment). In other words those inserts work fine in non-cluster enviorment.
Any help/tips to triage these issues is HIGHLY appreciated.
Thanks in advance.
Scenario 1 : An insert fails in a before-insert trigger that is at the database level:
Caused by: weblogic.jdbc.base.BaseBatchUpdateException: [BEA][Oracle JDBC Driver][Oracle]ORA-01591: lock held by in-doubt distributed transaction 198.29.102854 ORA-06512: at "XXX_BEFORE_INS_TRG", line 25 ORA-04088: error during execution of trigger ''XXX_BEFORE_INS_TRG''
Caused by: weblogic.jdbc.base.BaseBatchUpdateException: [BEA][Oracle JDBC Driver][Oracle]ORA-01591: lock held by in-doubt distributed transaction 129.38.575352 at weblogic.jdbc.base.BasePreparedStatement.executeOneStatementAtATime(Unknown Source) at weblogic.jdbc.base.BaseStatement.executeBatchEmulation(Unknown Source) at weblogic.jdbc.base.BasePreparedStatement.executeBatch(Unknown Source) at weblogic.jdbcx.base.BaseStatementWrapper.executeBatch(Unknown Source) at weblogic.jdbc.wrapper.PreparedStatement.executeBatch(PreparedStatement.java:157) at weblogic.jdbc.wrapper.PreparedStatement_weblogic_jdbcx_base_BasePreparedStatementWrapper.executeBatch(Unknown Source) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
05-11-10, 21:19 #2Registered User
Provided Answers: 1Code:
- Join Date
- Aug 2003
- Where the Surf Meets the Turf @Del Mar, CA
01591, 00000, "lock held by in-doubt distributed transaction %s" // *Cause: Trying to access resource that is locked by a dead two-phase commit // transaction that is in prepared state. // *Action: DBA should query the pending_trans$ and related tables, and attempt // to repair network connection(s) to coordinator and commit point. // If timely repair is not possible, DBA should contact DBA at commit // point if known or end user for correct outcome, or use heuristic // default if given to issue a heuristic commit or abort command to // finalize the local portion of the distributed transaction.You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Good judgement comes from experience. Experience comes from bad judgement.