Author |
Message
|
dejanb |
Posted: Fri Dec 17, 2004 11:01 am Post subject: MQRC_RFH_STRING_ERROR Reason code 2335 using Pub/Sub JMS |
|
|
Novice
Joined: 17 Dec 2004 Posts: 11 Location: Palo Alto, CA
|
Hi,
We are getting the following exception using the Pub/Sub broker.
Broker command failed:
MQRC_RFH_STRING_ERROR Reason code 2335
com.ibm.mq.jms.BrokerCommandFailedException: Broker command failed: MQRC_RFH_STRING_ERROR Reason code 2335
at com.ibm.mq.jms.SubscriptionHelper.checkResponse(SubscriptionHelper.java:1410)
at com.ibm.mq.jms.MQMessageProducer.publish(MQMessageProducer.java:1840)
at com.ibm.mq.jms.MQTopicPublisher.publish(MQTopicPublisher.java:222)
at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at net.appl.jrisk.jms.generic.TopicPublisherInvocationWrapper.invoke(TopicPublisherInvocationWrapper.java:67)
at $Proxy15.publish(Unknown Source)
If anyone can help me diagnose the problem, I'd appreciate it (and if you live in the San Francisco Bay Area you'll have a beer on me . ).
Thanks,
Dejan |
|
Back to top |
|
 |
EddieA |
Posted: Fri Dec 17, 2004 12:04 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Fix the application building the message:
Quote: |
The contents of the NameValueString field in the MQRFH structure are not valid. NameValueString must adhere to the following rules:
The string must consist of zero or more name/value pairs separated from each other by one or more blanks; the blanks are not significant.
If a name or value contains blanks that are significant, the name or value must be enclosed in double-quote characters.
If a name or value itself contains one or more double-quote characters, the name or value must be enclosed in double-quote characters, and each embedded double-quote character must be doubled.
A name or value can contain any characters other than the null, which acts as a delimiter. The null and characters following it, up to the defined length of NameValueString, are ignored.
The following is a valid NameValueString:
Famous_Words "The program displayed ""Hello World"""
Corrective action: Modify the application that generated the message to ensure that it places in the NameValueString field data that adheres to the rules listed above. Check that the StrucLength field is set to the correct value. |
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
dejanb |
Posted: Fri Dec 17, 2004 12:08 pm Post subject: |
|
|
Novice
Joined: 17 Dec 2004 Posts: 11 Location: Palo Alto, CA
|
Thanks for the reply.
The problems is that the application is the MQ JMS library itself. So I cannot just "fix" it.
It might be a config option of the MQConnectionFactory or it could simply be a bug in the IBM JMS implementation.
Regards,
Dejan |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Dec 17, 2004 2:29 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
dejanb wrote: |
It might be a config option of the MQConnectionFactory or it could simply be a bug in the IBM JMS implementation. |
Be more specific please. Are you talking about a QueueConnectionFactory or a TopicConnectionFactory ? Which one are you using? What is your environment ?
 |
|
Back to top |
|
 |
EddieA |
Posted: Fri Dec 17, 2004 3:24 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
The problems is that the application is the MQ JMS library itself. So I cannot just "fix" it. |
Why do you say that. The error is thrown by the Broker when it receives a message that was not constructed correctly. You may have used JMS within the application to build the message, but JMS did not build it by itself.
If it is repeatable, then stop the Broker, send in the message, and then browse it with amqsbcg, so you will see the RFH2 and validate it is correctly formatted. And/Or post it here for someone else to "eyeball" it.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
dejanb |
Posted: Mon Dec 20, 2004 2:40 pm Post subject: |
|
|
Novice
Joined: 17 Dec 2004 Posts: 11 Location: Palo Alto, CA
|
Here's what we do:
1. Lookup the TopicConnectionFactory from JNDI
2. Create a TopicConnection and TopicSession
3. Create a Topic and a TopicSubscriber.
4. Create an ObjectMessage (TopicSession.createObjectMessage)
5. Call TopicPublisher.publish(Message)
If you know where to set a string property in that sequence I'd be very happy to give it a try but all of the transformations to the JMS Message to the MQ message and headers are done by the MQ JMS library (or the Pub/Sub broker) and I have no real control over it.
Regards,
Dejan |
|
Back to top |
|
 |
EddieA |
Posted: Mon Dec 20, 2004 2:52 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
If it is repeatable, then stop the Broker, send in the message, and then browse it with amqsbcg, so you will see the RFH2 and validate it is correctly formatted. And/Or post it here for someone else to "eyeball" it. |
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
dejanb |
Posted: Mon Dec 20, 2004 3:01 pm Post subject: |
|
|
Novice
Joined: 17 Dec 2004 Posts: 11 Location: Palo Alto, CA
|
It is repeatable but at one of our clients' site in Toronto and I don't have access to the MQ Server there (and they wouldn't let me).
I'll ask them for the headers but don't know if I'll get them.
Thanks,
Dejan |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Dec 20, 2004 7:39 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
dejanb wrote: |
PostPosted: Mon Dec 20, 2004 5:40 pm Post subject:
Here's what we do:
1. Lookup the TopicConnectionFactory from JNDI
2. Create a TopicConnection and TopicSession
3. Create a Topic and a TopicSubscriber.
4. Create an ObjectMessage (TopicSession.createObjectMessage)
5. Call TopicPublisher.publish(Message) |
Where do you specify the topic when you publish ? |
|
Back to top |
|
 |
dejanb |
Posted: Mon Dec 20, 2004 9:56 pm Post subject: |
|
|
Novice
Joined: 17 Dec 2004 Posts: 11 Location: Palo Alto, CA
|
The Topic is specified when the
TopicSession.createTopic(String topicName) method is called. And this one is definitely not null.
Afterwards only the Topic object returned by the above call is used.
Dejan |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Dec 21, 2004 11:54 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
I still do not see where in the above list you called
Publisher pub = session.createPublisher(topic);
Could we please see the offending code...?
 |
|
Back to top |
|
 |
dejanb |
Posted: Tue Dec 21, 2004 2:18 pm Post subject: |
|
|
Novice
Joined: 17 Dec 2004 Posts: 11 Location: Palo Alto, CA
|
The code is spread throughout several classes is it's not easy to isolate into a small testcase but this same code is run with other JMS vendors (Weblogic and Tibco Enterprise Message Service) and we don't have any problems with it.
Plus to handle JMS server failover we actually generate wrappers for the real JMS objects and recreate these if/when the JMS server comes back up.
I've requested the RFH2 header and hopefully will be able to post it here.
Dejan |
|
Back to top |
|
 |
dejanb |
Posted: Wed Dec 22, 2004 3:15 pm Post subject: Problem solved. |
|
|
Novice
Joined: 17 Dec 2004 Posts: 11 Location: Palo Alto, CA
|
Because we allow topic names to be defined externally in XML files in three places these were defined as XXX.YYY."ZZZ.AAA" (with the double quotes) and after changing the definitions the problem went away.
What is still puzzling to me though is that MQ will throw the exception when you publish a message to that topic and not when the topic is created.
And sometimes it will not even fail there...
Thanks to everyone for their suggestions.
Dejan |
|
Back to top |
|
 |
bower5932 |
Posted: Wed Dec 22, 2004 6:14 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Now that you mention it, I think there is a description of what characters are valid in a topic name in one of the manuals. I'm guessing that you got through one error check and then failed a second. |
|
Back to top |
|
 |
dejanb |
Posted: Wed Dec 22, 2004 7:09 pm Post subject: |
|
|
Novice
Joined: 17 Dec 2004 Posts: 11 Location: Palo Alto, CA
|
I remember a couple of years back with the old JMS libraries having some invalid topic names and then the
TopicSession.createTopic(String) was throwing an exception when you'd pass an invalid name.
I guess now this is "enhanced" to hide the real reson as much as possible from the user and give you exceptions later when you don't know what is the cause... |
|
Back to top |
|
 |
|