You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Yuvaraj <yu...@equifax.com> on 2008/03/24 15:35:10 UTC

ActiveMQ RA serialization issue in Websphere

Hi,
   Iam using ActiveMQ 5.0.0 as the messaging infrastructure within Websphere
Application Server 6.1. I installed the Resource Adapter(RAR) that comes
with ActiveMQ. I am running into a NPE when I try to retrieve a
ConnectionFactory from the JNDI Tree. After some digging found that there is
a known bug similar to this reported with GlassFish and there is a patch
available for the 5.1 release.
https://issues.apache.org/activemq/browse/AMQ-765 

My question is, Is this specific to GlassFish only or Is this an issue in
all J2EE environments ? Is there a binary patch release available for 5.0.0
and other previous versions ? If not How do I get to the patched  5.1
version ?

Thanks Much
Yuvaraj

I have included a stack trace of the exception below:

[3/23/08 21:06:53:771 EDT] 00000029 FreePool      E   J2CA0046E: Method
createManagedConnectionWithMCWrapper caught an exception during creation of
the ManagedConnection for resource eis/javax.jms.ConnectionFactory, throwing
ResourceAllocationException.  Original exception:
<=================================>Exception Message -> null
java.lang.NullPointerException
	at
org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:126)
	at
com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1810)
	at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1542)
	at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2213)
	at
com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:895)
	at
com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:595)
	at
org.apache.activemq.ra.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:91)
	at
org.apache.activemq.ra.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:64)
	at
org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:188)
	at
org.springframework.jms.listener.AbstractJmsListeningContainer.createSharedConnection(AbstractJmsListeningContainer.java:209)
	at
org.springframework.jms.listener.AbstractJmsListeningContainer.refreshSharedConnection(AbstractJmsListeningContainer.java:197)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer.refreshConnectionUntilSuccessful(DefaultMessageListenerContainer.java:701)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer.recoverAfterListenerSetupFailure(DefaultMessageListenerContainer.java:683)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:835)
	at java.lang.Thread.run(Thread.java:801)








-- 
View this message in context: http://www.nabble.com/ActiveMQ-RA-serialization-issue-in-Websphere-tp16253150s2354p16253150.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ RA serialization issue in Websphere

Posted by gdaswani <ge...@hotmail.com>.
Khudalla's patch fixes it for me in Glassfish.  You need to compile it
manually though as the patch isn't committed to the trunk yet (so the
snapshots won't have it)..

Even with the patch, the resource adapter is still pretty useless under
glassfish especially under XA transactions.  If you happen to tie the use of
a database, and jms together in the same transaction (common usecase) -
you'll get get prepare errors from glassfish and the transaction being
rolled back.

for more info: http://forums.java.net/jive/thread.jspa?messageID=235026


khudalla wrote:
> 
> Hi, Juvaraj!
> 
> The problem is that the ManagedConnectionFactory provided in the RA is not
> serializable (well, it actually is serializable but its reference to the
> ResourceAdapter implementation is transient). I have created a patch for
> this problem (which is most likely to occur in any J2EE environment that
> tries to store instances of the ManagedConnectionFactory in JNDI and thus
> serializes it). However, the patch has not yet made it into SVN :-( It is
> available from JIRA though:
> http://issues.apache.org/activemq/browse/AMQ-765
> 
> You can download the patch file and should be able to apply it to the 5.1
> snapshot sources using your favorite IDE.
> 
> Good luck,
> Kai
> 
> 

-- 
View this message in context: http://www.nabble.com/ActiveMQ-RA-serialization-issue-in-Websphere-tp16253150s2354p16447876.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ RA serialization issue in Websphere

Posted by khudalla <Ka...@de.bosch.com>.
Hi, Juvaraj!

The problem is that the ManagedConnectionFactory provided in the RA is not
serializable (well, it actually is serializable but its reference to the
ResourceAdapter implementation is transient). I have created a patch for
this problem (which is most likely to occur in any J2EE environment that
tries to store instances of the ManagedConnectionFactory in JNDI and thus
serializes it). However, the patch has not yet made it into SVN :-( It is
available from JIRA though:
http://issues.apache.org/activemq/browse/AMQ-765

You can download the patch file and should be able to apply it to the 5.1
snapshot sources using your favorite IDE.

Good luck,
Kai

-- 
View this message in context: http://www.nabble.com/ActiveMQ-RA-serialization-issue-in-Websphere-tp16253150s2354p16270113.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.