eclipse-ee4j / openmq

OpenMQ
https://projects.eclipse.org/projects/ee4j.openmq/
Other
52 stars 34 forks source link

NullPonterException is caused when receiving StreamMessage type message from DMQ(trucateBody=true) #247

Open glassfishrobot opened 11 years ago

glassfishrobot commented 11 years ago

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

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

glassfishrobot commented 6 years ago
glassfishrobot commented 11 years ago

@glassfishrobot Commented Reported by tak09

glassfishrobot commented 11 years ago

@glassfishrobot Commented File: test1664.jar Attached By: tak09

glassfishrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA MQ-247