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 » General IBM MQ Support » RFH Error

Post new topic  Reply to topic
 RFH Error « View previous topic :: View next topic » 
Author Message
sjackson
PostPosted: Wed Jul 11, 2001 9:23 am    Post subject: Reply with quote

Apprentice

Joined: 28 Jun 2001
Posts: 26
Location: Milwaukee


Hello.

We are using Java clients to two different NT servers, both running NT 4.0 with the following MQSeries software installed:

MQSeries 5.2
CSD1 Support Pack
MA0C Publish-Subscribe Support Pack

Each NT server has only one queue manager and broker.

We tested the brokers using the amqsres program provided in the Pub-Sub Support Pack, and they appear to be working fine.

When we run the Java program to register a subscriber, we get the following error, but on only one server:

--------
MQRC_RFH_ERROR (2334, X'091E')

Explanation: The message contains an MQRFH structure, but the structure is not valid.

Completion Code: MQCC_FAILED

Programmer Response: Modify the application that generated the message to ensure that it places a valid MQRFH structure in the message data.
--------

Here is a snippet of the Java code, provided by the application group -

--------
// Build the RFH header for Pub/Sub
String pubSubCmd = "";
long totalMQRFHLength = 0;

// Set the message format in MQMD
msg.format = "MQHRF ";
msg.replyToQueueName = queues[i];
msg.replyToQueueManagerName = queueManagerName;
//msg.report = MQC.MQRO_NAN;
//msg.messageType = MQC.MQMT_REQUEST;
msg.correlationId = corr_ID.getBytes();


pubSubCmd = "MQPSCommand RegSub MQPSTopic "+topics[i]+" MQPSRegOpts CorrelAsId ";

totalMQRFHLength = 32 + pubSubCmd.length();

msg.writeString("RFH ");
msg.writeInt4((int)1);
msg.writeInt4((int)totalMQRFHLength);
msg.writeInt4(2146);
msg.writeInt4(0);
msg.writeString(" ");
msg.writeInt4(0);
msg.writeString(pubSubCmd);
--------

I can't see anything wrong with the RFH parameters - and again, this code works fine on one of the machines.

Any ideas what could be causing this error?

Thanks in advance.

Scott Jackson
Leapnet
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kolban
PostPosted: Wed Jul 11, 2001 2:02 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

It may just be formatting but the following:

msg.writeString("RFH ");
msg.writeInt4((int)1);
msg.writeInt4((int)totalMQRFHLength);
msg.writeInt4(2146);
msg.writeInt4(0);
msg.writeString(" ");
msg.writeInt4(0);
msg.writeString(pubSubCmd);

causes me concern for msg.writeString(" ");

Are you sure that you have specified 8 characters?
Back to top
View user's profile Send private message
sjackson
PostPosted: Wed Jul 11, 2001 4:54 pm    Post subject: Reply with quote

Apprentice

Joined: 28 Jun 2001
Posts: 26
Location: Milwaukee

Just bad formatting ....

We found out that removing the CSD1 support pack fixed the problem.

Thanks for the reply.

Scott

Back to top
View user's profile Send private message Send e-mail Visit poster's website
kolban
PostPosted: Wed Jul 11, 2001 5:33 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

Scott, I found the answer. In the MQSeries Application programming reference, the section on CCSID reads as follows:

-----------

CodedCharSetId (MQLONG)
Character set identifier of data that follows NameValueString .
This specifies the character set identifier of the data that follows NameValueString ;
it does not apply to character data in the MQRFH structure itself.

On the MQPUT or MQPUT1 call, the application must set this field to the value
appropriate to the data. The following special value can be used:

MQCCSI_INHERIT --- Inherit character-set identifier of this structure.

Character data in the data following this structure is in the same character
set as this structure.
The queue manager changes this value in the structure sent in the message
to the actual character-set identifier of the structure. Provided no error
occurs, the value MQCCSI_INHERIT is not returned by the MQGET call.
This value is supported in the following environments: AIX, HP-UX,
OS/390, OS/2, AS/400, Sun Solaris, Windows NT, plus MQSeries clients
connected to these systems.
The initial value of this field is MQCCSI_UNDEFINED.

------------

Bottom line, the value of 0 for the CCSID means MQCCSI_UNDEFINED. You need to specify MQCCIS_INHERIT (numeric value '-2')

It appears that CSD1 has enforced a setting that should not have been valid previously.


[ This Message was edited by: kolban on 2001-07-11 18:34 ]
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 » General IBM MQ Support » RFH Error
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.