activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khudalla <Kai.Huda...@de.bosch.com>
Subject Re: NullPointerException with RA on Glassfish
Date Sun, 06 Jan 2008 21:26:47 GMT

Hi, Chris, James!

I have put some time into this issue and already have commented on it in
JIRA. I think I have found the problem and already have hacked up a solution
which I would like to elaborate on. However, James, in JIRA the issue is not
assigned to anyone and I would like to discuss some class design changes
before implementing a fix and submitting a patch. Who is taking care of the
RA code? Is this you, James? Should I discuss this issue with you directly?

Regards,
Kai



rhavyn wrote:
> 
> Jira issue create: http://issues.apache.org/activemq/browse/AMQ-765.
> 
> Thanks for your help with this, I'm extremely happy at how quickly both
> the ActiveMQ and Glassfish teams respond to their users and how helpful
> the response is.  It's quite a change from some other projects I've dealt
> with.
> 
> Please let me know if you need any additional information from me to help
> you resolve this issue.
> 
> Thanks!
> --Chris
> 
> 
> James.Strachan wrote:
>> 
>> Thanks for the great feedback - could you raise a JIRA so we don't
>> forget this. Looks like we need to look at the serialization of the
>> RA's ActiveMQConnectionFactory to ensure it works nicely with being
>> serialized/deserialized in GlassFish
>> 
>> 
>> On 6/20/06, rhavyn <rhavyn@gmail.com> wrote:
>>>
>>> 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.
>>>
>>>
>> 
>> 
>> -- 
>> 
>> James
>> -------
>> http://radio.weblogs.com/0112098/
>> 
>> 
> 

-- 
View this message in context: http://www.nabble.com/NullPointerException-with-RA-on-Glassfish-tp4947362s2354p14653957.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message