ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Exception in Message.readFully(byte [])

Post new topic  Reply to topic
 Exception in Message.readFully(byte []) « View previous topic :: View next topic » 
Author Message
santhana lakshmi
PostPosted: Mon Feb 21, 2005 6:29 am    Post subject: Exception in Message.readFully(byte []) Reply with quote

Newbie

Joined: 02 Feb 2005
Posts: 6
Location: Mumbai

Hi,

I am working on java Cryptoserver in which we need to exchange messages from OS/390 and WIN NT. The requirement is like i should write and read message as bytes from the queue.

The same worked when i wrote message into the queue using Message.write(byte []). but when i try to read the same message using Message.readFully(byte []) i am getting NullPointerException. i want to know whether the message is converted to ascii after writing into the queue or is there any other reason for me getting the exception.

please tell me is there any other way for the same. i am using websphere MQ. please find the exception below.

Exception in thread "main" java.lang.NullPointerException
at java.io.ByteArrayInputStream.read(Unknown Source)
at java.io.DataInputStream.readFully(Unknown Source)
at com.ibm.mq.MQMessage.readFully(MQMessage.java:410)
at J_MQ1.read(J_MQ1.java:85)
at Cntrl.main(Cntrl.java:17)

Thanks in advance!
_________________
With Regards,

Santhana Lakshmi Rajagopal,
Tata Consultancy services Limited,
Mumbai,India
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Mon Feb 21, 2005 6:32 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Probably some mod will move this to the Java/JMS forum, where it belongs.

You are most likely trying to do a readFully after you've already read the message and have not reset the read pointer.

Or you are trying to readFully on an invalid message object.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Exception in Message.readFully(byte [])
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.