Krishnan
Krishnan

Reputation: 175

how to debug an issue when the cause is not known

We are facing the following exception in weblogic server v10.3.2.0. We are using JRockit JRE 6.0.

We have around 6-7 XA datasources involved in every server request. We face this exception when processing on the last datasource just begins.

Please someone advise.

java.sql.SQLException: Unexpected exception while enlisting XAConnection 
java.sql.SQLException: Transaction rolled back: setRollbackOnly called on transaction 
at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1616) 
at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1503) 
at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:446) 
at weblogic.jdbc.jta.DataSource.connect(DataSource.java:403) 
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:364) 
at com.ibatis.sqlmap.engine.transaction.jta.JtaTransaction.init(JtaTransaction.java:68) 
at com.ibatis.sqlmap.engine.transaction.jta.JtaTransaction.getConnection(JtaTransaction.java:131) 
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForObject(MappedStatement.java:120) 
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:518) 
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:493) 
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:106) 
at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(SqlMapClientImpl.java:82) 

Upvotes: 5

Views: 10312

Answers (3)

nsfyn55
nsfyn55

Reputation: 15363

If I had to guess I would say the last datasource is not configured properly as an XA datasource, doesn't have the the XA driver installed, or doesn't support XA.

Are you doing any funny exception handling here that would truncate the stack(Catching re-throwing but only keeping the top set of stack frames) or using a custom exception handling library? If you are I would abandon it. It seems like there should be a caused by: with additonal lower level stack related to your datasource's drivers that would reveal additional information.

If that isn't the case and this is the only info you're getting. It might be time to crank your server's logging up to debug or trace and get down and dirty with how weblogic gets things done..

Alternatively, if you are supported I would verify your driver versions/ configurations with your vendor. If you're not, you need to track down the documentation and verify for yourself.

Upvotes: 1

Rostislav Matl
Rostislav Matl

Reputation: 4543

You say that it is the last datasource - have you read this ? : http://muness.blogspot.com/2005/09/distributed-transactions-and-timeouts.html .

If you need more info, can you replace ibatis with a version with hacked com.ibatis.sqlmap.engine.transaction.jta.JtaTransaction.init() ? Add some logging there and you'll know more, probably.

Upvotes: 1

KLE
KLE

Reputation: 24159

As you wrote, the cause is unkown in this sample. We can see the transaction has been marked as "must roll back", probably by the previous datasources when something went wrong.

Maybe you can check previous logs, for the previous datasource, to find the cause ?

Upvotes: 1

Related Questions