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 » java.io.IOException: Message catalog not found

Post new topic  Reply to topic
 java.io.IOException: Message catalog not found « View previous topic :: View next topic » 
Author Message
srikanth_reddy
PostPosted: Sat Jan 10, 2009 2:57 pm    Post subject: java.io.IOException: Message catalog not found Reply with quote

Newbie

Joined: 08 Jan 2009
Posts: 1

Hi
I am getting following exception when I try to convert MQMessage to String. My application able to read the message, but when I try to convert the Message to string by using java client as fallows
Note: all req jars are in classpath
public String convertRawMessageToString(MQMessage rawMessage) throws DataAccessException {

String message = null;
rawMessage.format = MQC.MQFMT_STRING;

try {
message = rawMessage.readStringOfCharLength(rawMessage.getTotalMessageLength());
}
catch (EOFException eof) {
cat.error("MQSeriesDataAccess.readRecord() - Caught EOF message reading from MQ " + eof.getMessage() + " " + Utils
.getNowDateString());
throw new DataAccessException(eof.getMessage());
}
catch (java.io.IOException ioe) {
cat.error("MQSeriesDataAccess.readRecord() - An error occurred whilst writing to the message buffer " + ioe.getMes
sage() + " " + Utils.getNowDateString());
throw new DataAccessException(ioe.getMessage());
}

return message;
}

IOException as fallows:
java.io.IOException: Message catalog not found
at com.ibm.mq.MQMessage.readConvertedString(MQMessage.java:3316)
at com.ibm.mq.MQMessage.readStringOfCharLength(MQMessage.java:1245)
at com.ibm.mq.MQMessage.readString(MQMessage.java:1938)
at com.cmg.dataloader.plugins.MQSeriesDataAccess.convertRawMessageToString(MQSeriesDataAccess.java:193)
Back to top
View user's profile Send private message
geordaa
PostPosted: Wed Feb 04, 2009 12:47 am    Post subject: Reply with quote

Newbie

Joined: 23 Sep 2005
Posts: 4

No answer I'm afraid, but I am getting the same error:

com.xxx.xxx.exceptions.XXXXXException: java.io.EOFException: Message catalog not found
at com.xxx.xxxxxx.MQSTRMessage.populateMessage(MQSTRMessage.java:151)

I started getting my error after upgrading to MQ7, and still after patched to 7.0.0.1

Worked fine with MQ6. Anyone know of any differences in this area between 6 & 7?

All jars are in the classpath. Help appreciated.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Feb 04, 2009 3:41 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

This is dangerous territory:
Quote:
String message = null;
rawMessage.format = MQC.MQFMT_STRING;


I would not try to transform a raw message into a string message by setting the format on the message...

Try instead, extracting the bytes from the raw message and setting/writing them onto a new message that you create with same CCSID and encoding and set the text format to the new message. You can then read the text from the message or get a conversion error. If you do not put and get (with convert) the message remember to reset the pointer before reading...

There is no guarantee if you receive a new message that it is a string message for which the format has not been set.

So you could also extract the bytes from the message , read the CCSID and encoding and use that information to translate the bytestream using java.nio ....

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
geordaa
PostPosted: Mon Feb 16, 2009 8:11 am    Post subject: Reply with quote

Newbie

Joined: 23 Sep 2005
Posts: 4

geordaa wrote:
No answer I'm afraid, but I am getting the same error:

com.xxx.xxx.exceptions.XXXXXException: java.io.EOFException: Message catalog not found
at com.xxx.xxxxxx.MQSTRMessage.populateMessage(MQSTRMessage.java:151)

I started getting my error after upgrading to MQ7, and still after patched to 7.0.0.1

Worked fine with MQ6. Anyone know of any differences in this area between 6 & 7?

All jars are in the classpath. Help appreciated.



Got a fix for my problem..... The messages are RFH2, and I found that application was throwing the error only for RFH2 messages and not MQSTR messages. Finally found the piece in the programmers guide that points you to set queue definitions to PROPCTL(FORCE) if you cannot set MQC.MQGMO_PROPERTIES_FORCE_MQRFH2 to force new message properties introduced in mq 7.0 in rfh2 format.

The end game will be to change the application to set this, but for now I have a workaround.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Feb 16, 2009 10:23 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Well if you really have an RFH header you should be using JMS. It will handle the RFH header behind the scenes for you. Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » java.io.IOException: Message catalog not found
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.