How to debug a problem when the cause is unknown

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

We have about 6-7 XA data sources involved in each server request. We encounter this exception when processing the last data source is just beginning.

Please 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) 
+4
source share
3 answers

As you wrote, the reason is not shown in this example. We can see that the transaction was marked as “due rollback”, perhaps according to previous data sources, when something went wrong.

Perhaps you can check the previous logs for the previous data source to find the reason?

+1
source

You say this is the last data source - did you read this ?: http://muness.blogspot.com/2005/09/distributed-transactions-and-timeouts.html .

If you need more information, can you replace ibatis with the hacked version com.ibatis.sqlmap.engine.transaction.jta.JtaTransaction.init ()? Add a few magazines and you will know more, perhaps.

+1
source

If I had to guess, I would say that the last data source is incorrectly configured as an XA data source, does not have an XA driver installed, or does not support XA.

Do you do any funny exception handling that truncates the stack (catching re-throwing, but keeping only the top set of stack frames) or using a special exception handling library? If you, I would refuse it. It looks like it should be caused by: with an extra low-level stack associated with your data source drivers, which will reveal additional information.

If this is not the case, and this is the only information you receive. Perhaps it is time to start logging your server to debug or trace , and go down and fall off with how web logic does its best.

Alternatively, if you are supported, I will check your driver / configuration versions with your provider. If you do not, you need to find the documentation and see for yourself.

+1
source

Source: https://habr.com/ru/post/1369494/


All Articles