Andres,
Yes - there is a big try block that is throwing the NPE and then the stack
trace gets swallowed by the exception handling block. I will be getting
the code from CVS because the source in the jar most likely doesn't include
any build process.
We are trying to connect to the existing clustered OpenMQ brokers that
exist with our Glassfish cluster. So I will try to mixing the JMS 1.1
and 1.0.2 syntax to see if that breaks and is the problem.
The difference between the failing scenario and my test scenarios are:
1. failing scenario has full code base / test scenario has code meant for you
2. failing scenario is cluster / test scenario is a DAS
3. failing scenario has a security manager / test scenario doesn't
Both pieces of code are doing outbound and inbound on the same CF/TCF
and Dest/Topic. Its not the same connection/session - just the same
administered objects. Just as I had documented before.
I don't recall any permissions that were required by the RA - if that is
not correct, please let me know.
I'm trying to deploy to a cluster but now I can't even get the RA to work
in a clustered environment and when I deploy my application the JNDI does
contain the CF nor the Topic.
I've not tried with the security manager but may depending on the test
above.
I can ask them to turn on logging in the failing scenario - that might
help a bit.
I will also download the source but we are not interested in running in
production with home grown patches.
Thanks!
Brian
----- Original message -----
From: "Andreas Loew" <Andreas.Loew_at_Sun.COM>
To: users_at_jmsjca.dev.java.net
Date: Mon, 12 Jan 2009 18:26:16 +0100
Subject: Re: Sessions are already closed / now NPEs
Sorry Brian,
I was even trying to make it more complex as it indeed is:
There is no NPE thrown from this:
Andreas Loew schrieb:
> throw Exc.jmsExc(LOCALE.x("E034: Could not create session {0}: {1}",
> sessionClass.getName(), ex), ex);
but rather, the hidden "ex" being thrown is the infamous NPE, as you can
see from the fact that the following ends up in the log:
2009-01-11 23:26:34,699 ERROR [httpSSLWorkerThread-50011-4]:cluster1svr3
(SpringJmsBroadcastListener.java:219) - unable to send message
javax.jms.JMSException: JMSJCA-E034: Could not create session
javax.jms.Session: java.lang.NullPointerException
So do an ex.printStackTrace() before line 153 and you'll find out about
the NPE.
And just one more important finding:
In your connection pool definition, you register a
javax.jms.TopicConnectionFactory in JNDI. Therefore, from the
SpringTemplate, you get a TopicConnectionFactory instance (and *not* the
generic javax.jms.ConnectionFactory from JMS 1.1).
From the way the old-style JMS 1.0.2 API had been designed, it is only
legal to call createTopicConnection() on this TopicConnectionFactory
(and not createConnection()), and on the topicConnection returned fron
this, you may only call createTopicSession() (and not createSession()).
Or - if you have a JMS 1.1 provider - simply change your connection pool
definition to provide the generic javax.jms.ConnectionFactory from the
pool - should be much easier... :-)
Maybe this is what got you into these troubles...
I wouldn't bet on it, but chances are not too bad... ;-)
Keeping my fingers crossed...
Best regards
Andreas
--
Andreas Loew
Senior Java Architect
Sun Microsystems (Germany)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jmsjca.dev.java.net
For additional commands, e-mail: users-help_at_jmsjca.dev.java.net