I get a:

java.lang.NullPointerException
        at java.io.DataOutputStream.writeUTF(DataOutputStream.java:317)
        at com.evermind.server.jms.b5.<init>(JAX)
        at com.evermind.server.jms.b0.start(JAX)
        at Subscriber.<init>(Subscriber.java:33)
        at Subscriber.main(Subscriber.java:75)

when doing a topicConnection.start

At the same time jmschat works just fine. Any idea what I'm doing wrong
?

Thanks in advance

Orion 1.2.7. jdk 1.3beta IBM/Linux

The code:

  InitialContext ic = new InitialContext();
  TopicConnectionFactory tcf = (TopicConnectionFactory)
   ic.lookup("java:comp/env/jms/topicConnectionFactory");

  topicConnection = tcf.createTopicConnection();

  topic = (Topic) ic.lookup("java:comp/env/jms/TheTopic");

  topicSession = topicConnection.createTopicSession(false,
   TopicSession.AUTO_ACKNOWLEDGE);


  topicSubscriber = topicSession.createSubscriber(topic, null, true);

  topicPublisher = topicSession.createPublisher(topic);

  topicSubscriber.setMessageListener(this);

  topicConnection.start();
======================================================
application-client.xml:

<?xml version="1.0"?>
<!DOCTYPE application-client PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE
Application Client 1.2//EN"
"http://java.sun.com/j2ee/dtds/application-client_1_2.dtd">
<application-client>
 <display-name>Unnamed</display-name>
 <resource-ref>
  <res-ref-name>jms/topicConnectionFactory</res-ref-name>
  <res-type>javax.jms.TopicConnectionFactory</res-type>
  <res-auth>Container</res-auth>
 </resource-ref>
 <resource-ref>
  <res-ref-name>jms/TheTopic</res-ref-name>
  <res-type>javax.jms.Topic</res-type>
  <res-auth>Container</res-auth>
 </resource-ref>
</application-client>


Reply via email to