RE: java.lang.NullPointerException in JMS

2001-03-01 Thread Edoardo Comar
Title: java.lang.NullPointerException in JMS



I got the same problem. 
connection.start() throws an NPE
Search for JMS in this 
list and you'll findsomething.

I couldn't solve it - I 
loggedthe fact as blocking in bugzillaand 
had to switch to weblogic for the time being.

Edo


  -Original 
  Message-From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]On Behalf Of Matt 
  SimmersonSent: 01 March 2001 14:19To: 
  Orion-InterestSubject: 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"  
  descriptionJMS Logger/description /topic 
  I have referenced these in my application-client.xml as 
  
  application-client  display-nameApp 
  Logger/display-name  resource-ref 
   
   
  res-ref-namejms/LoggerTopicConnectionFactory/res-ref-name 
   
   
  res-typejavax.jms.TopicConnectionFactory/res-type 
   
   
  res-authContainer/res-auth  /resource-ref 
   
  resource-ref  
   
  res-ref-namejms/ApplicationLoggerTopic/res-ref-name 
   
   
  res-typejavax.jms.Topic/res-type  
   
  res-authContainer/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. 



RE: java.lang.NullPointerException in JMS

2001-03-01 Thread Heikkinen, Jarno

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" 
  descriptionJMS Logger/description 
/topic 
I have referenced these in my application-client.xml as 
 application-client 
display-nameApp Logger/display-name 
resource-ref 
 
res-ref-namejms/LoggerTopicConnectionFactory/res-ref-name 
res-typejavax.jms.TopicConnectionFactory/res-type 
res-authContainer/res-auth 
/resource-ref 
resource-ref 
res-ref-namejms/ApplicationLoggerTopic/res-ref-name 
res-typejavax.jms.Topic/res-type 
res-authContainer/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.