• Post Reply Bookmark Topic Watch Topic
  • New Topic

JMS Tutorial

Simon Ingram
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,

I tried to run the first and simplest of the JMS tutorial examples. This is the SimpleQueueSender and SimpleQueueReceiver example, for which Sun kindly supply the two programs. I get a null pointer exception. I have scanned the sun web site looking for reports of this, but have found nothing, so I debugged. The results suggest something nasty happening in JMS. Is this the right forum for such a question?

In this code, I dont get to the "we made it" line.

This is what comes off the command line:

C:\J2EE\Projects\Simple\classes>java -Djms.properties=%J2EE_HOME%\config\jms_client.properties SimpleQueueSender myQ 3

Queue name is myQ

Java(TM) Message Service 1.0.2 Reference Implementation (build b14)


Sending message: This is message 1


Exception in thread "main" java.lang.NullPointerException
at com.sun.jms.service.SessionImpl.persistMessage(SessionImpl.java:242)
at com.sun.jms.service.SessionImpl.addIncomingMessage(SessionImpl.java:1088)
at com.sun.jms.service.ConnectionImpl.addIncomingMessage(ConnectionImpl.java:436)
at com.sun.jms.service.JMSServiceImpl.sendMessage(JMSServiceImpl.java:811)
at org.omg.stub.com.sun.jms.service._JMSServiceImpl_Tie._invoke(Unknown Source)
at com.sun.corba.ee.internal.corba.ServerDelegate.dispatch(ServerDelegate.java:355
at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:255)
at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:8
at com.sun.corba.ee.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:9

I am confused by the fact that I can see the line that produces the null pointer, but when I check the reference, it is not null in the program I call. The stack shows me an error in JMS, but there is no mention of this kind of error at Sun.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!