当原因未知时如何调试问题

发布于 2024-12-02 02:09:23 字数 1380 浏览 1 评论 0原文

我们在 weblogic server v10.3.2.0 中遇到以下异常。我们使用 JRockit JRE 6.0。

每个服务器请求涉及大约 6-7 个 XA 数据源。当最后一个数据源的处理刚刚开始时,我们会遇到此异常。

请有人指教。

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) 

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) 

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

江南月 2024-12-09 02:09:23

正如您所写,此示例中的原因未知。
我们可以看到该事务已被标记为“必须回滚”,可能是在出现问题时被之前的数据源标记为“必须回滚”。

也许您可以检查以前的日志,对于以前的数据源,以找到原因?

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 ?

从来不烧饼 2024-12-09 02:09:23

你说它是最后一个数据源 - 你读过这个吗? :http://muness.blogspot.com/2005/09/分布式事务和超时.html

如果您需要更多信息,您可以将 ibatis 替换为被黑客攻击的版本 com.ibatis.sqlmap.engine.transaction.jta.JtaTransaction.init() 吗?在那里添加一些日志记录,您可能会了解更多。

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.

一世旳自豪 2024-12-09 02:09:23

如果我不得不猜测,我会说最后一个数据源没有正确配置为 XA 数据源,没有安装 XA 驱动程序,或者不支持 XA。

您是否在这里进行任何有趣的异常处理来截断堆栈(捕获重新抛出但仅保留顶部堆栈帧集)或使用自定义异常处理库?如果你是我就会放弃它。似乎应该有一个由以下原因引起: 具有与数据源的驱动程序相关的附加较低级别堆栈,这会显示附加信息。

如果情况并非如此,这是您获得的唯一信息。可能是时候将服务器的日志记录提高到debugtrace,并深入了解Weblogic如何完成工作。

或者,如果您受到支持,我会验证您与供应商的驱动程序版本/配置。如果不是,您需要查找文档并亲自验证。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文