Description:
Specify (truncateBody=true) when starting Broker. NullPointerException is caused when receiving StreamMessage type message from DMQ.
Error Message:
15/11/2012 2:40:52 PM com.sun.messaging.jmq.jmsclient.ExceptionHandler logCaughtException
WARNING: [I500]: Caught JVM Exception: java.lang.NullPointerException
com.sun.messaging.jms.JMSException: [C4038]: java.lang.NullPointerException
at com.sun.messaging.jmq.jmsclient.ExceptionHandler.getJMSException(ExceptionHandler.java:386)
at com.sun.messaging.jmq.jmsclient.ExceptionHandler.handleException(ExceptionHandler.java:337)
at com.sun.messaging.jmq.jmsclient.ExceptionHandler.handleException(ExceptionHandler.java:313)
at com.sun.messaging.jmq.jmsclient.StreamMessageImpl.readPrimitiveObject(StreamMessageImpl.java:209)
at com.sun.messaging.jmq.jmsclient.StreamMessageImpl.readString(StreamMessageImpl.java:431)
at Consumer.main(Consumer.java:51)
Caused by: java.lang.NullPointerException
at com.sun.messaging.jmq.jmsclient.StreamMessageImpl.readPrimitiveObject(StreamMessageImpl.java:197)
... 2 more
To reproduce:
1.Specify the following options when starting broker.
imqbrokerd -name 7676 -port 7676 -Dimq.message.expiration.interval=5 -Dimq.destination.DMQ.truncateBody=true
Description: Specify (truncateBody=true) when starting Broker. NullPointerException is caused when receiving StreamMessage type message from DMQ.
Error Message:
To reproduce: 1.Specify the following options when starting broker. imqbrokerd -name 7676 -port 7676 -Dimq.message.expiration.interval=5 -Dimq.destination.DMQ.truncateBody=true
2.Create resources. asadmin create-jms-resource --restype javax.jms.ConnectionFactory? CF asadmin create-jms-resource --restype javax.jms.Queue Queue asadmin create-jms-resource --restype javax.jms.Queue --property Name=mq.sys.dmq DMQ
3.Create physical destination. (Use DMQ) imqcmd create dst -t q -n Queue -u admin -pw admin -o useDMQ=true -f
4.Send messages. java Producer CF Queue ABCD
5.Receive messages. java Consumer CF001 DMQ
6.Error occurs at StreamMessage.getString when receiving a message.
[Excepted] com.sun.messaging.jms.MessageEOFException: [C4013]: Unexpected end of stream when read message - cause: java.lang.NullPointerException
[Actual] com.sun.messaging.jms.JMSException: [C4038]: java.lang.NullPointerException
Environment
Glassfish v4.0 b45