activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhavyn <rha...@gmail.com>
Subject Re: NullPointerException with RA on Glassfish
Date Tue, 20 Jun 2006 16:59:17 GMT

Thank you again for your quick response.  I posted a forum message describing
this issue and received a response from the Glassfish people.  This is what
they said:

"Thanks for trying out GlassFish. Since I have only the trace snippet above,
I tried to debug this problem by going through ActiveMQ RA's source
available at
https://svn.apache.org/repos/asf/incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/

This is what I understand happens. Please correct me if there are errors.
When ActiveMQConnectionFactory
[https://svn.apache.org/repos/asf/incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionFactory.java]
is created at the createConnectionFactory method of
https://svn.apache.org/repos/asf/incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java,
the ConnectionManager is initialized to a *transient* variable "manager".
Since ConnectionFactory instances can be serialized/deserialized while
publishing to JNDI (as is the case in Project GlassFish), the
connectionManager reference is lost and hence the NPE. The fix ideally
should be in the ActiveMQRA's code. You could copy me [sivakumart AT sun DOT
com] while you are discussing this with ActiveMQ, if you wish. If you still
have any issues, please provide a copy of your domain.xml [connector
connection pool, resource configuratin information] and the entire trace in
server.log."

Now, I'm new to all this resource adapter stuff, does that make sense to
you?

Thanks,
--Chris


James.Strachan wrote:
> 
> I'd suggest raising a bug against GlassFish as its sounding like its
> JCA container is not providing a ConnectionManager. FWIW the Resource
> Adapter works fine in the Geronimo JCA container so I suspect it to be
> a GlassFish bug.
> 
> 
> On 6/20/06, rhavyn <rhavyn@gmail.com> wrote:
>>
>> Thanks for your quick response.  I took a look at the change you made and
>> it
>> does make it clearer where the error is.  However, is there any chance
>> that
>> you might have a pointer towards how I can resolve the issue on the
>> Glassfish end of things?  I am using UseInboundSessoinEnabled to work
>> around
>> the issue at the moment, but for the sake of completeness, I'd like to
>> understand how to make the container do the right thing.  I've looked
>> through the documentation on the Glassfish site and I've Googled using
>> all
>> the keywords I can think of and nothing is coming up.
>>
>> Thanks again,
>> --Chris
>>
>>
>> James.Strachan wrote:
>> >
>> > It looks like this exception...
>> >
>> > Caused by: java.lang.NullPointerException
>> >        at
>> >
>> org.apache.activemq.ra.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:88)
>> >
>> > is caused by Glassfish calling
>> >
>> >   ManagedConnectionFactory.createConnectionFactory(ConnectionManager
>> > manager)
>> >
>> > by passing in a null ConnectionManager.
>> >
>> > So it sounds like Glassfish is not creating a connection manager to
>> > use. This is only required if UseInboundSessionEnabled is not set.
>> >
>> > I've just updated SVN HEAD of ActiveMQ to throw a more descriptive
>> > error message if the JCA container does not configure a
>> > ConnectionManager.
>> >
>> >
>> --
>> View this message in context:
>> http://www.nabble.com/NullPointerException-with-RA-on-Glassfish-t1814940.html#a4951551
>> Sent from the ActiveMQ - User forum at Nabble.com.
>>
>>
> 
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 
--
View this message in context: http://www.nabble.com/NullPointerException-with-RA-on-Glassfish-t1814940.html#a4959057
Sent from the ActiveMQ - User forum at Nabble.com.


Mime
View raw message