activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shoaib Akhtar (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AMQ-1054) XA recover fails for 4.0.1
Date Mon, 27 Nov 2006 11:33:02 GMT
    [ https://issues.apache.org/activemq/browse/AMQ-1054?page=comments#action_37561 ] 
            
Shoaib Akhtar commented on AMQ-1054:
------------------------------------

Hi, 
I am also using atomikos with activemq and facing the same problem, i ran the above test with
logging turned on and with level Debug and my log output is as follows.

DEBUG [main] WireFormatNegotiator.start(65) | Sending: WireFormatInfo { version=1, properties={TightEncodingEnabled=true,
TcpNoDelayEnabled=true, SizePrefixDisabled=false, StackTraceEnabled=true, MaxInactivityDuration=30000,
CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
DEBUG [ActiveMQ Transport: tcp://localhost/127.0.0.1:61616] WireFormatNegotiator.onCommand(95)
| Received WireFormat: WireFormatInfo { version=1, properties={StackTraceEnabled=true, TightEncodingEnabled=true,
TcpNoDelayEnabled=true, SizePrefixDisabled=false, MaxInactivityDuration=30000, CacheEnabled=true},
magic=[A,c,t,i,v,e,M,Q]}
DEBUG [ActiveMQ Transport: tcp://localhost/127.0.0.1:61616] WireFormatNegotiator.onCommand(102)
| tcp://localhost/127.0.0.1:61616 before negotiation: OpenWireFormat{version=1, cacheEnabled=false,
stackTraceEnabled=false, tightEncodingEnabled=false, sizePrefixDisabled=false}
DEBUG [ActiveMQ Transport: tcp://localhost/127.0.0.1:61616] WireFormatNegotiator.onCommand(113)
| tcp://localhost/127.0.0.1:61616 after negotiation: OpenWireFormat{version=1, cacheEnabled=true,
stackTraceEnabled=true, tightEncodingEnabled=true, sizePrefixDisabled=false}
DEBUG [main] TransactionContext.recover(503) | Recover: 16777216

and the exception was as follows.

Exception in thread "main" java.lang.ClassCastException: [Lorg.apache.activemq.command.DataStructure;
	at org.apache.activemq.TransactionContext.recover(TransactionContext.java:508)
	at activemqtest.XATest.main(XATest.java:27)


It seems to me that in case when activemq has nothing to recover as there is no transaction
to recover then the code has problems and the offending line is

return (XATransactionId[]) receipt.getData();

And my ide is on evaluating this line shows me
receipt.getData() = org.apache.activemq.command.DataStructure[0]

and it seems to me that this array of DataStructure contains nothing and it is just instantiated
without any elements and the class used to instatiate is not the instance of XATransactionId,
i think it might work if there is something to recover.




> XA recover fails for 4.0.1
> --------------------------
>
>                 Key: AMQ-1054
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1054
>             Project: ActiveMQ
>          Issue Type: Bug
>         Environment: Java, JDK 1.4, Windows, Atomikos TransactionsEssentials for the
JTA/XA part
>            Reporter: Guy Pardon
>
> XAResource.recover seems to fail for 4.x of ActiveMQ:
> ERROR IN RECOVERY [thread: SimpleAsyncTaskExecutor-3] on: 06-11-16 08:43:35,152 
> [Lorg.apache.activemq.command.DataStructure; [thread: SimpleAsyncTaskExecutor-3] on:
06-11-16 08:43:35,152 
> at: org.apache.activemq.TransactionContext.recover(TransactionContext.java:508) [thread:
SimpleAsyncTaskExecutor-3] on: 06-11-16 08:43:35,152 
> at: com.atomikos.datasource.xa.XATransactionalResource.recover(Unknown Source) [thread:
SimpleAsyncTaskExecutor-3] on: 06-11-16 08:43:35,152 
> at: com.atomikos.datasource.xa.XATransactionalResource.endRecovery(Unknown Source) [thread:
SimpleAsyncTaskExecutor-3] on: 06-11-16 08:43:35,152 
> at: com.atomikos.icatch.imp.TransactionServiceImp.recover(Unknown Source) [thread: SimpleAsyncTaskExecutor-3]
on: 06-11-16 08:43:35,153 
> at: com.atomikos.datasource.xa.XATransactionalResource.setRecoveryService(Unknown Source)
[thread: SimpleAsyncTaskExecutor-3] on: 06-11-16 08:43:35,153 
> at: com.atomikos.icatch.system.Configuration.addResource(Unknown Source) [thread: SimpleAsyncTaskExecutor-3]
on: 06-11-16 08:43:35,153 
> at: com.atomikos.jms.QueueConnectionFactoryBean.checkSetup(Unknown Source) [thread: SimpleAsyncTaskExecutor-3]
on: 06-11-16 08:43:35,153 
> at: com.atomikos.jms.QueueConnectionFactoryBean.createQueueConnection(Unknown Source)
[thread: SimpleAsyncTaskExecutor-3] on: 06-11-16 08:43:35,153 
> at: com.atomikos.jms.QueueConnectionFactoryBean.createConnection(Unknown Source) [thread:
SimpleAsyncTaskExecutor-3] on: 06-11-16 08:43:35,153 
> Also see http://www.atomikos-support.com/forums/viewtopic.php?t=351 (where I borrowed
this stack trace from). We have seen similar things in other applications that tried to use
ActiveMQ. I think this is a class cast error in ActiveMQ...
> With 3.1 there is no problem. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message