开发者

Database connection error

开发者 https://www.devze.com 2023-03-08 11:55 出处:网络
I am getting the below error while making JDBC calls to the database. I am using - Microsoft SQL Server 2005

I am getting the below error while making JDBC calls to the database. I am using -

  • Microsoft SQL Server 2005
  • Weblogic 10

java.sql.SQLException: [SQLState=null][ErrorCode=0]Unexpected exception while enlisting XAConnection java.sql.SQLException: Transaction rolled back: Unknown reason at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1419) at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnl开发者_C百科ist(DataSource.java:1331) at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:426) at weblogic.jdbc.jta.DataSource.connect(DataSource.java:383) at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:339)

Any thoughts as to why this is coming? Or any way i can debug it?


Immediate thought: check to see if you're using the right JDBC driver. The "XA" part of your connection indicates that your call is attempting to join in a distributed transaction - that might not be supported with your version of weblogic/SQLServer 2005.

(Failing that, if you're writing your own database calls with the JDBC Driver, make sure you're not using an "XA" driver unless you want the distributed transaction features.)


I found the issue. There was a Infinite loop in my code which was causing the connection leak.

0

精彩评论

暂无评论...
验证码 换一张
取 消