|
[
Permlink
| « Hide
]
Chris Conrad added a comment - 20/Jun/06 05:10 PM
The mailing list discussion related to this issue can be found at: http://www.nabble.com/NullPointerException-with-RA-on-Glassfish-t1814940.html#a4959128
The same thing happens on oracle (oc4j) 10.1.3, except that I am using ActiveMQTopicConnectionFactory, instead of the managed connection factory.
Same error, same line. Details: In the code, the context lookups for the topics go through just fine (the objects are found), but upon calling factory.createTopicConnection(), I get the NPE. Setting UseInboundSession to true lets this go through just fine, but I'm not writing a message driven bean, so this doesn't help me out very much. Does anyone know if this is still an issue with 4.1.1 or 5.0.0?
Rob Davies made changes - 19/Aug/07 10:37 PM
It is still an issue in 4.1.1.
The exception log I get on ActiveMQ 4.1.1 with
Sun Java System Application Server 9.1 (build b58g-fcs)
michal kozakiewicz made changes - 06/Nov/07 03:35 PM
After further investigation :
In version 4.1.1 the manager is not transient and not null, but I think I am getting the same error with the transient managed connection factory. Everything starts here: @Resource(mappedName = "jms/UserUpdateConnectionFactory") @PostConstruct jmsConnection = jmsConnectionFactory.createConnection(); //at this point the jmsConnectionFactory is of class ActiveMQConnectionFactory but it's managed connection factory is null {....} } Iam not sure if this because I didnt configure something or because of the fact that managed connection factory is transient. after calling ActiveMQConnectionFactory.createConnection the null mcf is passed to ConnectionManagerImpl.allocateConnection. in this method there is a check: if(_logger.isLoggable(Level.INFO)){ the fresh mcf retrieved from pool meta data PoolMetaData pmd = registry.getPoolMetaData( poolName ); ManagedConnectionFactory freshMCF = pmd.getMCF(); is a proper activemq mcf but the value is used only for logging purposes: this conmgr.mcf_not_equal translates to The mcf being used to allocate the connection and the MCF in the pool are not equal. in the attached log-finest.txt log file. Finally when ConnectorAllocator.createResource method is called the mcf is null :
michal kozakiewicz made changes - 07/Nov/07 07:29 AM
I have tried to work around the problem described by Michal by simply declaring the factory property of ActiveMQConnectionFactory to not be transient. However, after running my test driver for accessing a ConnectionFactory managed by the ActiveMQ RA, I ran into the following problem:
Caused by: java.lang.RuntimeException: Cant copy Serializable object: After having spent some time looking at the RA source code of version 5.0.0 my feeling is that the ActiveMQManagedConnectionFactory violates the javax.resource.spi.ManagedConnectionFactory contract because it is not Serializable. ActiveMQManagedConnectionFactory has a property of type org.apache.activemq.ra.MessageResourceAdapter which extends the javax.resource.spi.ResourceAdapter interface which itself does NOT extend Serializable, i.e. implementors are not required to be serializable. The ActiveMQResourceAdapter implementing the MessageResourceAdapter interface, however, claims to be serializable but does have a property of type javax.resource.spi.BootstrapContext. But BootstrapContext implementations are not required to be Serializable. In case of glassfish the passed in com.sun.enterprise.connectors.BootstrapContextImpl class is NOT serializable. Therefore, declaring the factory property to NOT be transient is not working because ActiveMQManagedConnectionFactory is not serializable as mandated by the JCA spec. Any thoughts? Kai Hi,
I have spent some time fixing the Resource Adapter's serialization issue in order to make it work in glassfish v2. Therefore I made some changes to ActiveMQConnectionFactory, ActiveMQManagedConnectionFactory and ActiveMQResourceAdapter. I have also created additional test cases and updated the existing ones to reflect my changes. I have successfully tested it in my local environment using glassfish v2 and v2 UR1 on JDK 1.5.0_14. I have also attached a patch for the 5.1 SNAPSHOT code in SVN. Could someone test it against Geronimo in order to see if it's still working there? Regards, Patch to fix serialization issue on glassfish.
Kai Hudalla made changes - 14/Jan/08 07:50 AM
Kai Hudalla made changes - 28/Jan/08 08:44 AM
Already fixed in 5.1 instead of 5.2
Kai Hudalla made changes - 12/Feb/08 05:09 AM
Resource Adapter has been fixed to support serialization of RA components as performed by glasfish.
Kai Hudalla made changes - 12/Feb/08 05:10 AM
Is this problem really fixed on the latest 5.1 snapshots? I tried the 03/29/08 5.1-SNAPSHOT but I'm still running into the following error
---------------------- CUT ------------------- when trying to use outbound connections
Rob Davies made changes - 16/Apr/08 08:43 AM
Applied patch to trunk - in SVN Committed revision 648727
Rob Davies made changes - 16/Apr/08 08:46 AM
Apply patch for https://issues.apache.org/activemq/browse/AMQ-765
Hiram Chirino made changes - 22/Apr/08 10:21 AM
Hiram Chirino made changes - 28/Apr/08 09:56 AM
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||