Hi,

I had the same problem, but with queue-connection-factory.  It works for the
very first time, but if you stop Orion and restart, the connection.start()
gives NullPointerException.  To me, it looks like Orion has problems
rebinding the configured factories, if the factory exists already, the NPE
is thrown when client tries to start the connection.  

Now, if I remove the queue-connection-factory tag from jms.xml and restart -
the JMS access client starts work perfectly (yes, it's no longer configured
into jms.xml, but it works anyway).  I am not that familiar with Orion, I
don't know where orion actually stores the binding for JMS factory class,
but it really looks like there is something odd there.

As Orion doesn't produce any kind of debug log (or is there a hidden
option?), tracking down things like this is really difficult.  Especially in
this case, where it looks like the connection factory lookup() is OK, it
just fails when starting it.

Jarno

-----Original Message-----
From: Matt Simmerson [mailto:[EMAIL PROTECTED]]
Sent: 1. maaliskuuta 2001 16:19
To: Orion-Interest
Subject: java.lang.NullPointerException in JMS


Hi 
I've created my own topic-connection-factory and own topic in jms.xml 
<topic-connection-factory host="172.16.61.1"
location="jms/LoggerTopicConnectionFactory" port="9127"/> 
<topic name="ApplicationLoggerTopic" location="jms/appLoggerTopic"> 
  <description>JMS Logger</description> 
</topic> 
I have referenced these in my application-client.xml as 
 <application-client> 
        <display-name>App Logger</display-name> 
        <resource-ref> 
 
<res-ref-name>jms/LoggerTopicConnectionFactory</res-ref-name> 
                <res-type>javax.jms.TopicConnectionFactory</res-type> 
                <res-auth>Container</res-auth> 
        </resource-ref> 
        <resource-ref> 
                <res-ref-name>jms/ApplicationLoggerTopic</res-ref-name> 
                <res-type>javax.jms.Topic</res-type> 
                <res-auth>Container</res-auth> 
        </resource-ref> 
 </application-client> 
I reference these in my code, and print out the topic name which display
"Demo Topic" !!! 
TopicConnectionFactory connFactory = (TopicConnectionFactory)new
InitialContext().lookup("java:comp/env/jms/LoggerTopicConnectionFactory");
this.connection = connFactory.createTopicConnection(); 
this.loggerTopic = (Topic)new
InitialContext().lookup("java:comp/env/jms/ApplicationLoggerTopic"); 
When the code executes connection.start() I get the following error. 
java.lang.NullPointerException 
        at java.io.DataOutputStream.writeUTF(DataOutputStream.java:329) 
        at java.io.DataOutputStream.writeUTF(DataOutputStream.java:306) 
        at com.evermind.server.jms.cj.<init>(JAX) 
        at com.evermind.server.jms.b8.start(JAX) 
        at
AppLogger.LoggerListeners.JMSLoggerSubscriber.initSubscriber(JMSLogge 
rSubscriber.java:116) 
        at
AppLogger.LoggerListeners.JMSLoggerSubscriber.<init>(JMSLoggerSubscri 
ber.java:76) 
        at
AppLogger.LoggerListeners.JMSLoggerSubscriber.main(JMSLoggerSubscribe 
r.java:33) 
Has anyone any idea what I've missed, or know how to resolve this. 
Cheers 
Matt 
Matt Simmerson 
IT Consultant 
smart421 - Smart solutions for the 21st century 
  
http://www.smart421.com 
Wap Site: wap.smart421.com 
Tel:   01473 408720 
Fax:  01473 408753 
Mob: 07759 258083 
email: [EMAIL PROTECTED] 
Information contained in this e-mail and any attachments is confidential 
and intended for the use of the addressee only.  Dissemination, 
distribution, copying or use of this communication without prior permission 
of the addressee is strictly prohibited. If you have received this 
transmission in error, please advise the originator by reply e-mail and 
delete it. Thank you. 

Reply via email to