Title: FW: [JBoss-dev] XADataSource wrapper for JBoss 4
Hi Igor.
 
I applied the patch and initially found the XAResourceTest tests ran successfully a number of times. Ive found that after running the XAResourceTest, if l leave SQL Server running, stop and start JBoss and then run the test again, the testSimpleCommitTx test fails (see the log extract below). Ive started having a look at it - if you dont think its worth the effort let me know. Given the senario the exception occurs under and the presence of static objects, is it possible that either the MS JDBC drivers or the VM could be hanging onto something that is messing up the works?
 
Jamie
 
line 238 :   tx.delistResource(xares, XAResource.TMSUCCESS);
line 239:    tx.commit();
 
Log Extract:
 
2002-09-30 20:20:36,987 WARN  [org.jboss.tm.TransactionImpl] XAException: tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=burns01//17, BranchQual=] errorCode=XAER_RMERR
javax.transaction.xa.XAException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]xa_end (4000000) returns -6
 at com.microsoft.jdbcx.sqlserver.SQLServerImplXAResource.executeXaRpc(Unknown Source)
 at com.microsoft.jdbcx.sqlserver.SQLServerImplXAResource.end(Unknown Source)
 at com.microsoft.jdbcx.base.BaseXAResource.end(Unknown Source)
 at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.end(XAManagedConnection.java:118)
 at org.jboss.tm.TransactionImpl.endResource(TransactionImpl.java:1353)
 at org.jboss.tm.TransactionImpl.delistResource(TransactionImpl.java:727)
 at org.jboss.test.jca.tm.XAResourceTest.testSimpleCommitTx(XAResourceTest.java:238)

 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:548)
 at org.jboss.jmx.adaptor.rmi.RMIAdaptorImpl.invoke(RMIAdaptorImpl.java:265)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
 at sun.rmi.transport.Transport$1.run(Transport.java:148)
 at java.security.AccessController.doPrivileged(Native Method)
 at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
 at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
 at java.lang.Thread.run(Thread.java:536)
2002-09-30 20:20:36,997 WARN  [org.jboss.tm.TransactionImpl] XAException: tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=burns01//17, BranchQual=] errorCode=XAER_RMERR
javax.transaction.xa.XAException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]xa_end (4000000) returns -6
 at com.microsoft.jdbcx.sqlserver.SQLServerImplXAResource.executeXaRpc(Unknown Source)
 at com.microsoft.jdbcx.sqlserver.SQLServerImplXAResource.end(Unknown Source)
 at com.microsoft.jdbcx.base.BaseXAResource.end(Unknown Source)
 at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.end(XAManagedConnection.java:118)
 at org.jboss.tm.TransactionImpl.endResource(TransactionImpl.java:1353)
 at org.jboss.tm.TransactionImpl.endResources(TransactionImpl.java:1428)
 at org.jboss.tm.TransactionImpl.checkStatusForPrepare(TransactionImpl.java:1917)
 at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:308)
 at org.jboss.test.jca.tm.XAResourceTest.testSimpleCommitTx(XAResourceTest.java:239)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:548)
 at org.jboss.jmx.adaptor.rmi.RMIAdaptorImpl.invoke(RMIAdaptorImpl.java:265)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
 at sun.rmi.transport.Transport$1.run(Transport.java:148)
 at java.security.AccessController.doPrivileged(Native Method)
 at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
 at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
 at java.lang.Thread.run(Thread.java:536)
2002-09-30 20:20:37,007 INFO  [org.jboss.test.jca.tm.XAResourceTest] Exception in test
javax.transaction.RollbackException: Already marked for rollback
 at org.jboss.tm.TransactionImpl.checkStatusForPrepare(TransactionImpl.java:1923)
 at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:308)
 at org.jboss.test.jca.tm.XAResourceTest.testSimpleCommitTx(XAResourceTest.java:239)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:548)
 at org.jboss.jmx.adaptor.rmi.RMIAdaptorImpl.invoke(RMIAdaptorImpl.java:265)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
 at sun.rmi.transport.Transport$1.run(Transport.java:148)
 at java.security.AccessController.doPrivileged(Native Method)
 at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
 at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
 at java.lang.Thread.run(Thread.java:536)
2002-09-30 20:20:37,598 WARN  [org.jboss.tm.TransactionImpl] XAException: tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=burns01//22, BranchQual=] errorCode=XAER_RMERR
javax.transaction.xa.XAException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]xa_end (4000000) returns -6
 at com.microsoft.jdbcx.sqlserver.SQLServerImplXAResource.executeXaRpc(Unknown Source)
 at com.microsoft.jdbcx.sqlserver.SQLServerImplXAResource.end(Unknown Source)
 at com.microsoft.jdbcx.base.BaseXAResource.end(Unknown Source)
 at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.end(XAManagedConnection.java:118)
 at org.jboss.tm.TransactionImpl.endResource(TransactionImpl.java:1353)
 at org.jboss.tm.TransactionImpl.delistResource(TransactionImpl.java:727)
 at org.jboss.test.jca.tm.XAResourceTest.test590816(XAResourceTest.java:423)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:548)
 at org.jboss.jmx.adaptor.rmi.RMIAdaptorImpl.invoke(RMIAdaptorImpl.java:265)
 at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
 at sun.rmi.transport.Transport$1.run(Transport.java:148)
 at java.security.AccessController.doPrivileged(Native Method)
 at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
 at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
 at java.lang.Thread.run(Thread.java:536)
2002-09-30 20:20:37,608 INFO  [org.jboss.test.jca.tm.XAResourceTest] Exception in test
java.lang.Exception: could not delist xares  in tx1
 at org.jboss.test.jca.tm.XAResourceTest.test590816(XAResourceTest.java:425)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:548)
 at org.jboss.jmx.adaptor.rmi.RMIAdaptorImpl.invoke(RMIAdaptorImpl.java:265)
 at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
 at sun.rmi.transport.Transport$1.run(Transport.java:148)
 at java.security.AccessController.doPrivileged(Native Method)
 at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
 at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
 at java.lang.Thread.run(Thread.java:536)
2002-09-30 20:25:37,539 WARN  [org.jboss.tm.TransactionImpl] Transaction TransactionImpl:XidImpl [FormatId=257, GlobalId=burns01//22, BranchQual=] timed out. status=STATUS_MARKED_ROLLBACK
2002-09-30 20:25:37,549 WARN  [org.jboss.tm.TransactionImpl] Transaction TransactionImpl:XidImpl [FormatId=257, GlobalId=burns01//23, BranchQual=] timed out. status=STATUS_ACTIVE

-----Original Message-----
From: Igor Fedorenko [mailto:[EMAIL PROTECTED]]
Sent: Sunday, September 22, 2002 3:52 AM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-dev] XADataSource wrapper for JBoss 4


Jamie,

Could you try following patch for XAResourceTest.java. It is supposed to
fix empty branch id problem.

Jamie Burns wrote:
> By way of reminder, the exception is:
>
> javax.transaction.xa.XAException
>  at com.microsoft.jdbcx.base.BaseXAResource.checkXid(Unknown Source) 
> at com.microsoft.jdbcx.base.BaseXAResource.start(Unknown Source)  at
> org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnec
> tion.java:107)
>  at
> org.jboss.test.jca.tm.XAResourceTest.testSimpleCommitXid(XAResourceTest.java
> :173)
>
> The checkXid method is failing with the value it is getting from
> XidImpl.getBranchQualifier(). XidImpl is returning a byte[0]. Ive
> started comparing it to the JBoss 3.0 code and it looks pretty the
> same. Im guessing that somewhere JBoss 3.0 was setting it to a
> non-zero length array. I am going to look into it more closely over
> the weekend.
>
> ----- Original Message -----
> From: "Igor Fedorenko" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, September 07, 2002 2:18 PM
> Subject: Re: [JBoss-dev] XADataSource wrapper for JBoss 4
>
>
>
>>There are two types of tests in this test suite. First type ("raw"
>>tests) manages xids and makes xa calls directly, second type ("tx"
>>tests) create instance of Transaction and use this instance to manage
>>xa stuff. "Tx" tests are more important because they exercise actual
>>behaviour of jboss, while "raw" tests were meant to prove that very
>>basic xa functionality works. In your case all "raw" tests failed and
>>all "tx" tests succeeded. It is definitely a bug with raw tests but I
>>do not know what could be wrong with them.
>>
>>Jamie Burns wrote:
>>
>>>Ok. The XAResourceUnitTestCase threw 3 errors. See attached report.
>>>
>>>There are sections for 3 adapters in the class. I have hsqldb-ds.xml
>>>(Firebird?) and mssql-xa-ds.xml installed. Apart from removing one of
>>
> them,
>
>>>how do you tell which one has failed?
>>>
>>>Thanks
>>>
>>>Jamie
>>>
>>
>>
>>--
>>Igor Fedorenko
>>Think smart. Think automated. Think Dynamics. www.thinkdynamics.com
>>
>>
>>
>>-------------------------------------------------------
>>This sf.net email is sponsored by: OSDN - Tired of that same old cell
>>phone?  Get a new here for FREE!
>>https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
>>_______________________________________________
>>Jboss-development mailing list [EMAIL PROTECTED]
>>https://lists.sourceforge.net/lists/listinfo/jboss-development
>>
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Jboss-development mailing list [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development

--
Igor Fedorenko
Think smart. Think automated. Think Dynamics. www.thinkdynamics.com

 

********************************************************************************
  This electronic mail system is used for information purposes and is
  not intended to form any legal contract or binding agreement.
  The content is confidential and may be legally privileged. Access
  by anyone other than the addressee(s) is unauthorised and any
  disclosure, copying, distribution or any other action taken in
  reliance on it is prohibited and maybe unlawful

  All incoming and outgoing e-mail communications and attachments
  are scanned automatically by software designed to detect and remove
  any material containing viruses or other unauthorised content.  While
  we undertake best endeavours to ensure that this content checking
  software is up to date, recipients should take steps to assure themselves
  that e-mails received are secure.
********************************************************************************

Reply via email to