7 Replies Latest reply on Mar 15, 2007 3:39 PM by Weston M. Price

    Hibernate+JBossTS+SybaseXA=XAException

    mskonda Apprentice

      Have a look at the initial discussion about the ssue: http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4028316#4028316

      Weston, here's the stack trace:

      2007-03-15 13:47:12,563 INFO [test.com.cmi2.hib.HibernateMDB] ---> setMDBContext
      2007-03-15 13:47:12,568 INFO [test.com.cmi2.hib.HibernateMDB] ---> ejbCreate
      2007-03-15 13:47:12,573 INFO [test.com.cmi2.hib.HibernateMDB] ---> Message ' MK - 0 ' Received
      2007-03-15 13:47:12,574 INFO [test.com.cmi2.hib.HibernateMDB] --> publishing the message to testTopic2
      2007-03-15 13:47:12,574 INFO [test.com.cmi2.hib.HibernateMDB] Only one message
      2007-03-15 13:47:12,574 INFO [test.com.cmi2.hib.HibernateMDB] -->got xa conn factorg.jboss.resource.adapter.jms.JmsConnectionFactoryImpl@708a605c
      2007-03-15 13:47:12,581 INFO [test.com.cmi2.hib.HibernateMDB] -->created conns
      2007-03-15 13:47:12,587 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: registering pool with interval 900000 old interval: 450000
      2007-03-15 13:47:12,601 DEBUG [org.jboss.jms.ConnectionFactoryHelper] using connection factory: JBossConnectionFactory->ConnectionFactoryDelegate[1, SID=0]
      2007-03-15 13:47:12,601 DEBUG [org.jboss.jms.ConnectionFactoryHelper] using username/password: guest/-- not shown --
      2007-03-15 13:47:12,601 DEBUG [org.jboss.jms.client.remoting.JMSRemotingConnection] JMSRemotingConnection[bisocket://10.110.221.94:4457/?NumberOfCallRetries=2&clientMaxPoolSize=50&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&dataType=jms&marshaller=org.jboss.jms.server.remoting.JMSWireFormat&numberOfRetries=1&serializationtype=jms&socket.check_connection=false&unmarshaller=org.jboss.jms.server.remoting.JMSWireFormat] created
      2007-03-15 13:47:12,606 DEBUG [org.jboss.remoting.MicroRemoteClientInvoker] SocketClientInvoker[b4bbd50, bisocket://10.110.221.94:4457] added client with session ID a32652m-6usjoy-ezb9a390-1-ezb9awrd-v to the lease pinger
      2007-03-15 13:47:12,606 DEBUG [org.jboss.jms.client.remoting.JMSRemotingConnection] JMSRemotingConnection[bisocket://10.110.221.94:4457/?NumberOfCallRetries=2&clientMaxPoolSize=50&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&dataType=jms&marshaller=org.jboss.jms.server.remoting.JMSWireFormat&numberOfRetries=1&serializationtype=jms&socket.check_connection=false&unmarshaller=org.jboss.jms.server.remoting.JMSWireFormat] is doing push callbacks
      2007-03-15 13:47:12,606 DEBUG [org.jboss.remoting.Client] starting callback Connector: InvokerLocator [bisocket://10.110.221.94:304231203/callback?serverSocketClass=org.jboss.jms.server.remoting.ServerSocketWrapper&isCallbackServer=true&callbackServerProtocol=bisocket&datatype=jms&guid=a32652m-6usjoy-ezb9a390-1-ezb9awri-w&callbackServerHost=10.110.221.94&callbackServerPort=304231203&onewayThreadPool=org.jboss.jms.server.remoting.DirectThreadPool&serializationtype=jms&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper]
      2007-03-15 13:47:12,619 DEBUG [org.jboss.remoting.ServerInvoker] SocketServerInvoker[UNINITIALIZED] did not find server socket factory configuration as mbean service or classname. Creating default server socket factory.
      2007-03-15 13:47:12,619 DEBUG [org.jboss.remoting.ServerInvoker] SocketServerInvoker[UNINITIALIZED] created server socket factory javax.net.DefaultServerSocketFactory@6d289e48
      2007-03-15 13:47:12,619 DEBUG [org.jboss.remoting.transport.Connector] org.jboss.remoting.transport.Connector@1312656b started
      2007-03-15 13:47:12,620 DEBUG [org.jboss.remoting.ServerInvoker] ServerInvoker (SocketServerInvoker[UNINITIALIZED]) added client callback handler CallbackManager[2c320256] with session id of a32652m-6usjoy-ezb9a390-1-ezb9awrd-v+a32652m-6usjoy-ezb9a390-1-ezb9awrv-x and callback handle object of null.
      2007-03-15 13:47:12,620 DEBUG [org.jboss.remoting.InvokerRegistry] removed org.jboss.remoting.transport.local.LocalClientInvoker@1cc05d95 from registry
      2007-03-15 13:47:12,620 DEBUG [org.jboss.remoting.transport.bisocket.BisocketServerInvoker] creating control connection: InvokerLocator [null://10.110.221.94:2971/null]
      2007-03-15 13:47:12,621 DEBUG [org.jboss.remoting.transport.bisocket.BisocketServerInvoker] created control connection: Socket[addr=/10.110.221.94,port=2971,localport=50474]
      2007-03-15 13:47:12,627 DEBUG [org.jboss.jms.client.remoting.JMSRemotingConnection] JMSRemotingConnection[bisocket://10.110.221.94:4457/?NumberOfCallRetries=2&clientMaxPoolSize=50&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&dataType=jms&marshaller=org.jboss.jms.server.remoting.JMSWireFormat&numberOfRetries=1&serializationtype=jms&socket.check_connection=false&unmarshaller=org.jboss.jms.server.remoting.JMSWireFormat] started
      2007-03-15 13:47:12,632 DEBUG [org.jboss.remoting.ConnectionValidator] ConnectionValidator[null, pingPeriod=2000 ms] created
      2007-03-15 13:47:12,632 DEBUG [org.jboss.remoting.ConnectionValidator] ConnectionValidator[SocketClientInvoker[558ad183, bisocket://10.110.221.94:4457], pingPeriod=2000 ms] started
      2007-03-15 13:47:12,632 DEBUG [org.jboss.jms.message.MessageIdGeneratorFactory] checked out MessageIdGenerator for 0, reference count is 3
      2007-03-15 13:47:12,632 DEBUG [org.jboss.jms.ConnectionFactoryHelper] created XAConnection: JBossConnection->ConnectionDelegate[1053896183, ID=424, SID=0]
      2007-03-15 13:47:12,632 DEBUG [org.jboss.jms.client.remoting.ConsolidatedRemotingConnectionListener] ConnectionState[424].ConsolidatedListener adding JMS exception listener org.jboss.resource.adapter.jms.JmsManagedConnection@1720d359
      2007-03-15 13:47:12,634 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] supplying new ManagedConnection: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@7539f0bb[state=NORMAL mc=org.jboss.resource.adapter.jms.JmsManagedConnection@1720d359 handles=0 lastUse=1173966432634 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$PoolBySubjectAndCri@2eebc11d context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@77d36efb xaResource=MessagingXAResource[425] txSync=null]
      2007-03-15 13:47:12,634 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Got connection from pool org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@7539f0bb[state=NORMAL mc=org.jboss.resource.adapter.jms.JmsManagedConnection@1720d359 handles=0 lastUse=1173966432634 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$PoolBySubjectAndCri@2eebc11d context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@77d36efb xaResource=MessagingXAResource[425] txSync=null] [InUse/Available/Max]: [1/19/20]
      2007-03-15 13:47:12,644 INFO [test.com.cmi2.hib.HibernateMDB] -->created sessions
      2007-03-15 13:47:12,648 INFO [test.com.cmi2.hib.HibernateMDB] Topic /topic/testTopic3 exists
      2007-03-15 13:47:12,903 INFO [test.com.cmi2.hib.HibernateMDB] -->created pubishers
      2007-03-15 13:47:12,905 INFO [test.com.cmi2.hib.HibernateMDB] -->created txtmsgs
      2007-03-15 13:47:12,918 DEBUG [org.jboss.jms.client.container.ClosedInterceptor] ClosedInterceptor.ClientProducerDelegate[-1] closed
      2007-03-15 13:47:12,919 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] putting ManagedConnection back into pool kill=false cl=org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@7539f0bb[state=NORMAL mc=org.jboss.resource.adapter.jms.JmsManagedConnection@1720d359 handles=0 lastUse=1173966432634 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$PoolBySubjectAndCri@2eebc11d context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@77d36efb xaResource=MessagingXAResource[425] txSync=null]
      2007-03-15 13:47:12,919 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Returning connection to pool org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@7539f0bb[state=NORMAL mc=org.jboss.resource.adapter.jms.JmsManagedConnection@1720d359 handles=0 lastUse=1173966432919 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$PoolBySubjectAndCri@2eebc11d context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@77d36efb xaResource=MessagingXAResource[425] txSync=null] [InUse/Available/Max]: [0/20/20]
      2007-03-15 13:47:12,920 DEBUG [org.hibernate.impl.SessionFactoryObjectFactory] JNDI lookup: cmi2/testHibernate/hibernate/sessionFactory
      2007-03-15 13:47:12,920 DEBUG [org.hibernate.impl.SessionFactoryObjectFactory] lookup: uid=8aee5dde1155d9d3011155d9d6400000
      2007-03-15 13:47:12,920 INFO [test.com.cmi2.hib.HibernateMDB] SessionFactory found: org.hibernate.impl.SessionFactoryImpl@39223bf0
      2007-03-15 13:47:13,002 DEBUG [org.hibernate.jdbc.JDBCContext] successfully registered Synchronization
      2007-03-15 13:47:13,002 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 4808566509436928
      2007-03-15 13:47:13,004 INFO [test.com.cmi2.hib.HibernateMDB] Session created: SessionImpl(PersistenceContext[entityKeys=[],collectionKeys=[]];ActionQueue[insertions=[] updates=[] deletions=[] collectionCreations=[] collectionRemovals=[] collectionUpdates=[]])
      2007-03-15 13:47:13,004 INFO [test.com.cmi2.hib.HibernateMDB] Logging HibernateCat
      2007-03-15 13:47:13,011 DEBUG [org.hibernate.event.def.DefaultSaveOrUpdateEventListener] saving transient instance
      2007-03-15 13:47:13,012 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] generated identifier: 1173966433004, using strategy: org.hibernate.id.Assigned
      2007-03-15 13:47:13,016 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] saving [test.com.cmi2.hib.HibernateCat#1173966433004]
      2007-03-15 13:47:13,047 INFO [test.com.cmi2.hib.HibernateMDB] HibernateCat saved!!
      2007-03-15 13:47:13,048 INFO [test.com.cmi2.hib.HibernateMDB] Message Delivered Successfully in publish 3!
      2007-03-15 13:47:13,050 DEBUG [org.hibernate.transaction.CacheSynchronization] transaction before completion callback
      2007-03-15 13:47:13,050 DEBUG [org.hibernate.transaction.CacheSynchronization] automatically flushing session
      2007-03-15 13:47:13,050 DEBUG [org.hibernate.impl.SessionImpl] automatically flushing session
      2007-03-15 13:47:13,051 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] flushing session
      2007-03-15 13:47:13,052 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] processing flush-time cascades
      2007-03-15 13:47:13,054 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] dirty checking collections
      2007-03-15 13:47:13,054 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] Flushing entities and processing referenced collections
      2007-03-15 13:47:13,062 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] Processing unreferenced collections
      2007-03-15 13:47:13,062 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] Scheduling collection removes/(re)creates/updates
      2007-03-15 13:47:13,062 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] Flushed: 1 insertions, 0 updates, 0 deletions to 1 objects
      2007-03-15 13:47:13,062 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
      2007-03-15 13:47:13,065 DEBUG [org.hibernate.pretty.Printer] listing entities:
      2007-03-15 13:47:13,065 DEBUG [org.hibernate.pretty.Printer] test.com.cmi2.hib.HibernateCat{lname=Barry, fname=Larry, id=1173966433004}
      2007-03-15 13:47:13,066 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] executing flush
      2007-03-15 13:47:13,066 DEBUG [org.hibernate.jdbc.ConnectionManager] registering flush begin
      2007-03-15 13:47:13,066 DEBUG [org.hibernate.persister.entity.AbstractEntityPersister] Inserting entity: [test.com.cmi2.hib.HibernateCat#1173966433004]
      2007-03-15 13:47:13,078 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
      2007-03-15 13:47:13,078 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
      2007-03-15 13:47:13,079 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] supplying ManagedConnection from pool: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@6ac6b7ee[state=NORMAL mc=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1c55a106 handles=0 lastUse=1173966410400 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@39be9f72 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@11d612fc xaResource=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1c55a106 txSync=null]
      2007-03-15 13:47:13,080 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Got connection from pool org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@6ac6b7ee[state=NORMAL mc=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1c55a106 handles=0 lastUse=1173966410400 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@39be9f72 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@11d612fc xaResource=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1c55a106 txSync=null] [InUse/Available/Max]: [1/19/20]
      2007-03-15 13:47:13,088 DEBUG [org.hibernate.SQL] insert into HibernateCat (FirstName, LastName, Id) values (?, ?, ?)
      2007-03-15 13:47:13,088 INFO [STDOUT] Hibernate: insert into HibernateCat (FirstName, LastName, Id) values (?, ?, ?)
      2007-03-15 13:47:13,088 DEBUG [org.hibernate.jdbc.AbstractBatcher] preparing statement
      2007-03-15 13:47:13,089 DEBUG [org.hibernate.persister.entity.AbstractEntityPersister] Dehydrating entity: [test.com.cmi2.hib.HibernateCat#1173966433004]
      2007-03-15 13:47:13,089 DEBUG [org.hibernate.type.StringType] binding 'Larry' to parameter: 1
      2007-03-15 13:47:13,089 DEBUG [org.hibernate.type.StringType] binding 'Barry' to parameter: 2
      2007-03-15 13:47:13,089 DEBUG [org.hibernate.type.LongType] binding '1173966433004' to parameter: 3
      2007-03-15 13:47:13,093 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
      2007-03-15 13:47:13,093 DEBUG [org.hibernate.jdbc.AbstractBatcher] closing statement
      2007-03-15 13:47:13,093 DEBUG [org.hibernate.jdbc.ConnectionManager] skipping aggressive-release due to flush cycle
      2007-03-15 13:47:13,093 DEBUG [org.hibernate.jdbc.ConnectionManager] registering flush end
      2007-03-15 13:47:13,094 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
      2007-03-15 13:47:13,094 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
      2007-03-15 13:47:13,097 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] putting ManagedConnection back into pool kill=false cl=org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@6ac6b7ee[state=NORMAL mc=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1c55a106 handles=0 lastUse=1173966410400 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@39be9f72 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@11d612fc xaResource=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1c55a106 txSync=null]
      2007-03-15 13:47:13,098 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Returning connection to pool org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@6ac6b7ee[state=NORMAL mc=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1c55a106 handles=0 lastUse=1173966433098 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@39be9f72 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@11d612fc xaResource=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1c55a106 txSync=null] [InUse/Available/Max]: [0/20/20]
      2007-03-15 13:47:13,098 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] post flush
      2007-03-15 13:47:13,098 DEBUG [org.hibernate.jdbc.JDBCContext] before transaction completion
      2007-03-15 13:47:13,098 DEBUG [org.hibernate.impl.SessionImpl] before transaction completion
      2007-03-15 13:47:13,108 ERROR [org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory] End transaction failed for XAResource
      javax.transaction.xa.XAException
       at com.sybase.jdbc3.jdbc.SybXAResource.verifyReturnCode(SybXAResource.java:850)
       at com.sybase.jdbc3.jdbc.SybXAResource.sendRPC(SybXAResource.java:763)
       at com.sybase.jdbc3.jdbc.SybXAResource.sendRPC(SybXAResource.java:635)
       at com.sybase.jdbc3.jdbc.SybXAResource.end(SybXAResource.java:369)
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.end(XAManagedConnection.java:147)
       at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelPrepare(XAResourceRecord.java:259)
       at com.arjuna.ats.arjuna.coordinator.BasicAction.doPrepare(BasicAction.java:2872)
       at com.arjuna.ats.arjuna.coordinator.BasicAction.doPrepare(BasicAction.java:2829)
       at com.arjuna.ats.arjuna.coordinator.BasicAction.prepare(BasicAction.java:2383)
       at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1784)
       at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:87)
       at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
       at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1181)
       at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:134)
       at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
       at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:351)
       at org.jboss.jms.client.remoting.MessageCallbackHandler.callOnMessage(MessageCallbackHandler.java:153)
       at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:791)
       at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect14.invoke(SessionAspect14.java)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:171)
       at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:117)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:71)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
       at org.jboss.jms.client.JBossSession.run(JBossSession.java:211)
       at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
       at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
       at java.lang.Thread.run(Thread.java:595)
      2007-03-15 13:47:13,109 WARN [org.jboss.resource.connectionmanager.TxConnectionManager] Connection error occured: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@6ac6b7ee[state=NORMAL mc=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1c55a106 handles=0 lastUse=1173966433098 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@39be9f72 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@11d612fc xaResource=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1c55a106 txSync=null]
      javax.transaction.xa.XAException
       at com.sybase.jdbc3.jdbc.SybXAResource.verifyReturnCode(SybXAResource.java:850)
       at com.sybase.jdbc3.jdbc.SybXAResource.sendRPC(SybXAResource.java:763)
       at com.sybase.jdbc3.jdbc.SybXAResource.sendRPC(SybXAResource.java:635)
       at com.sybase.jdbc3.jdbc.SybXAResource.end(SybXAResource.java:369)
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.end(XAManagedConnection.java:147)
       at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelPrepare(XAResourceRecord.java:259)
       at com.arjuna.ats.arjuna.coordinator.BasicAction.doPrepare(BasicAction.java:2872)
       at com.arjuna.ats.arjuna.coordinator.BasicAction.doPrepare(BasicAction.java:2829)
       at com.arjuna.ats.arjuna.coordinator.BasicAction.prepare(BasicAction.java:2383)
       at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1784)
       at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:87)
       at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
       at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1181)
       at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:134)
       at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
       at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:351)
       at org.jboss.jms.client.remoting.MessageCallbackHandler.callOnMessage(MessageCallbackHandler.java:153)
       at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:791)
       at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect14.invoke(SessionAspect14.java)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:171)
       at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:117)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:71)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
       at org.jboss.jms.client.JBossSession.run(JBossSession.java:211)
       at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
       at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
       at java.lang.Thread.run(Thread.java:595)
      2007-03-15 13:47:13,110 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] putting ManagedConnection back into pool kill=true cl=org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@6ac6b7ee[state=NORMAL mc=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1c55a106 handles=0 lastUse=1173966433098 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@39be9f72 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@11d612fc xaResource=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1c55a106 txSync=null]
      2007-03-15 13:47:13,110 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Destroying returned connection org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@6ac6b7ee[state=NORMAL mc=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1c55a106 handles=0 lastUse=1173966433098 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@39be9f72 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@11d612fc xaResource=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1c55a106 txSync=null]
      2007-03-15 13:47:13,114 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Returning connection to pool org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@6ac6b7ee[state=DESTROYED mc=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1c55a106 handles=0 lastUse=1173966433098 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@39be9f72 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@11d612fc xaResource=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1c55a106 txSync=null] [InUse/Available/Max]: [0/20/20]
      2007-03-15 13:47:13,116 WARN [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.resources.arjunacore.preparefailed] [com.arjuna.ats.internal.jta.resources.arjunacore.preparefailed] XAResourceRecord.prepare - prepare failed with exception XAException.XAER_PROTO
      2007-03-15 13:47:13,116 WARN [com.arjuna.ats.arjuna.logging.arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.BasicAction_36] - BasicAction.End() - prepare phase of action-id a6edd5e:c37c:45f94e39:96 failed.
      2007-03-15 13:47:13,117 WARN [com.arjuna.ats.arjuna.logging.arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.BasicAction_38] - Action Aborting
      2007-03-15 13:47:13,127 ERROR [org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory] End transaction failed for XAResource
      javax.transaction.xa.XAException
       at com.sybase.jdbc3.jdbc.SybXAResource.sendRPC(SybXAResource.java:756)
       at com.sybase.jdbc3.jdbc.SybXAResource.sendRPC(SybXAResource.java:635)
       at com.sybase.jdbc3.jdbc.SybXAResource.end(SybXAResource.java:369)
       at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.end(XAManagedConnection.java:147)
       at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelAbort(XAResourceRecord.java:369)
       at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:3223)
       at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:3201)
       at com.arjuna.ats.arjuna.coordinator.BasicAction.phase2Abort(BasicAction.java:2212)
       at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1810)
       at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:87)
       at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
       at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1181)
       at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:134)
       at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
       at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:351)
       at org.jboss.jms.client.remoting.MessageCallbackHandler.callOnMessage(MessageCallbackHandler.java:153)
       at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:791)
       at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect14.invoke(SessionAspect14.java)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:171)
       at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:117)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:71)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
       at org.jboss.jms.client.JBossSession.run(JBossSession.java:211)
       at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
       at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
       at java.lang.Thread.run(Thread.java:595)
      2007-03-15 13:47:13,133 WARN [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.resources.arjunacore.rollbackxaerror] [com.arjuna.ats.internal.jta.resources.arjunacore.rollbackxaerror] XAResourceRecord.rollback - xa error XAException.XAER_RMERR
      2007-03-15 13:47:13,133 DEBUG [org.hibernate.transaction.CacheSynchronization] transaction after completion callback, status: 4
      2007-03-15 13:47:13,133 DEBUG [org.hibernate.jdbc.JDBCContext] after transaction completion
      2007-03-15 13:47:13,133 DEBUG [org.hibernate.impl.SessionImpl] after transaction completion
      2007-03-15 13:47:13,133 DEBUG [org.hibernate.transaction.CacheSynchronization] automatically closing session
      2007-03-15 13:47:13,133 DEBUG [org.hibernate.impl.SessionImpl] automatically closing session
      2007-03-15 13:47:13,133 DEBUG [org.hibernate.impl.SessionImpl] closing session
      2007-03-15 13:47:13,133 DEBUG [org.hibernate.jdbc.ConnectionManager] connection already null in cleanup : no action
      2007-03-15 13:47:13,134 ERROR [org.jboss.jms.asf.StdServerSession] failed to commit/rollback
      javax.transaction.RollbackException
       at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1192)
       at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:134)
       at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
       at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:351)
       at org.jboss.jms.client.remoting.MessageCallbackHandler.callOnMessage(MessageCallbackHandler.java:153)
       at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:791)
       at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect14.invoke(SessionAspect14.java)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:171)
       at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:117)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:71)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
       at org.jboss.jms.client.JBossSession.run(JBossSession.java:211)
       at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
       at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
       at java.lang.Thread.run(Thread.java:595)
      2007-03-15 13:47:13,134 INFO [test.com.cmi2.hib.HibernateMDB] ---> Message ' MK - 0 ' Received
      2007-03-15 13:47:13,161 INFO [test.com.cmi2.hib.HibernateMDB] --> publishing the message to testTopic2


      Here' the respective *ds.xml (whihc creates datasources)

      <datasources>
      
       <!-- ============================ -->
       <!-- local transaction datasource -->
       <!-- ============================ -->
      
       <local-tx-datasource>
       <jndi-name>CMITrade01EAIDS</jndi-name>
       <connection-url>jdbc:sybase:Tds:svc-trade01DBd:4100/MK_CMITrade01EAI</connection-url>
       <driver-class>com.sybase.jdbc3.jdbc.SybDataSource</driver-class>
       <use-java-context>true</use-java-context>
       <user-name>xxxxx</user-name>
       <password>xxxxx</password>
       <check-valid-connection-sql>SELECT @@VERSION</check-valid-connection-sql>
       <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter</exception-sorter-class-name>
       <metadata>
       <type-mapping>Sybase</type-mapping>
       </metadata>
       </local-tx-datasource>
      
       <!-- ============================ -->
       <!-- xa transaction datasource -->
       <!-- ============================ -->
      
       <xa-datasource>
       <jndi-name>CMITrade01EAIXADS</jndi-name>
       <use-java-context>true</use-java-context>
       <user-name>xxxx</user-name>
       <password>xxxxxx</password>
       <xa-datasource-class>com.sybase.jdbc3.jdbc.SybXADataSource</xa-datasource-class>
       <xa-datasource-property name="DatabaseName">MK_CMITrade01EAI</xa-datasource-property>
       <xa-datasource-property name="ServerName">svc-trade01DBd</xa-datasource-property>
       <xa-datasource-property name="PortNumber">4100</xa-datasource-property>
       <check-valid-connection-sql>SELECT @@VERSION</check-valid-connection-sql>
       <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter</exception-sorter-class-name>
       <metadata>
       <type-mapping>Sybase</type-mapping>
       </metadata>
       </xa-datasource>
      
      </datasources>
      


      Here's the tx conn factory:
       <tx-connection-factory>
       <jndi-name>JmsXA</jndi-name>
       <xa-transaction/>
       <rar-name>jms-ra.rar</rar-name>
       <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
       <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
       <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>
       <max-pool-size>20</max-pool-size>
       <security-domain-and-application>JmsXARealm</security-domain-and-application>
       <depends>jboss.messaging:service=ServerPeer</depends>
       </tx-connection-factory>
      


      My Sybase verion: Sybase SE 12.5.3

      Please let me know if you need furter info
      Thanks
      Madhu