Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 90387 invoked from network); 20 Jun 2006 17:02:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Jun 2006 17:02:57 -0000 Received: (qmail 16502 invoked by uid 500); 20 Jun 2006 17:02:56 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 16478 invoked by uid 500); 20 Jun 2006 17:02:56 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 16469 invoked by uid 99); 20 Jun 2006 17:02:56 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Jun 2006 10:02:56 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of james.strachan@gmail.com designates 66.249.92.169 as permitted sender) Received: from [66.249.92.169] (HELO ug-out-1314.google.com) (66.249.92.169) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Jun 2006 10:02:54 -0700 Received: by ug-out-1314.google.com with SMTP id m3so1407018uge for ; Tue, 20 Jun 2006 10:02:33 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fRbBm9KSAKG4Ec+HtoP7z39ZP0qhRBcUOW50ZD6H/C4iVkvvxdYfoqKt3vAHVVtzZ34vN5VaB2bmE7iAX8f/4jyCdJFM9J1fjFxEk01K2z1Y9F75IOkFFQV9y6W8WYWG954TUVV5CecB8AcoGs8hnoVk9ysR7TOhTpGG9x3hMmo= Received: by 10.67.89.6 with SMTP id r6mr6821376ugl; Tue, 20 Jun 2006 10:02:33 -0700 (PDT) Received: by 10.66.224.1 with HTTP; Tue, 20 Jun 2006 10:02:33 -0700 (PDT) Message-ID: Date: Tue, 20 Jun 2006 18:02:33 +0100 From: "James Strachan" To: activemq-users@geronimo.apache.org Subject: Re: NullPointerException with RA on Glassfish In-Reply-To: <4959057.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4947362.post@talk.nabble.com> <4951551.post@talk.nabble.com> <4959057.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 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 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/