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 » Errors when publishing or subscribing using JMS.

Post new topic  Reply to topic
 Errors when publishing or subscribing using JMS. « View previous topic :: View next topic » 
Author Message
rgt15442
PostPosted: Thu Aug 29, 2002 12:25 pm    Post subject: Errors when publishing or subscribing using JMS. Reply with quote

Newbie

Joined: 29 Aug 2002
Posts: 7

I am having difficulty getting a demo JMS application running using the Pub/Sub services of MQSeries.

When I subscribe or publish I get the following MQ errors (javax.jms.JMSException: MQJMS3011: Failed to publish message to MQ queue) and (javax.jms.JMSException: MQJMS3009: Failed to publish command to MQ queue). I also get a error on my console indicating that MQ was unable to (Unable to load message catalog - mqji)

I have installed the following components on NT:

1) MQSeries 5.2.1 for NT
2) MA88: MQSeries classes for Java and MQSeries classes for Java Message Service (latest version from supportpac site)
3) MA0C: MQSeries Publish/Subscribe. (latest version from supportpac site)

I have started the queue manager, and the broker and have verified that they are both running. It doesn't appear there are any problems there.

I have configured JNDI with the JMSAdmin tool with the following:

1) define tcf(TopicConnectionFactory) BROKERPUBQ(SYSTEM.BROKER.DEFAULT.STREAM) BROKERVER(V1) HOSTNAME(localhost) TRANSPORT(CLIENT) PORT(1414) BROKERQMGR(QM_install) QMANAGER(QM_install) CHANNEL(SYSTEM.DEF.SVRCONN) BROKERCONQ(SYSTEM.BROKER.CONTROL.QUEUE)

and a single topic

2) def t(Hot Deals) PERSISTENCE(PERS)
TARGCLIENT(JMS)
EXPIRY(APP)
ENCODING(NATIVE)
VERSION(1)
PRIORITY(APP)
TOPIC(Hot Deals)



Here's a sample of my subscriber ....

Properties env = new Properties();
// ... specify the JNDI properties specific to the vendor
//env.put(Context.SECURITY_PRINCIPAL, "guest");
//env.put(Context.SECURITY_CREDENTIALS, "guest");
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscontext.RefFSContextFactory");
env.put(Context.PROVIDER_URL, "file:/C:/jndi-provider");


InitialContext jndi = new InitialContext(env);

factory = (TopicConnectionFactory)jndi.lookup("TopicConnectionFactory");

connect = factory.createTopicConnection ();
connect.setClientID(username);

session = connect.createTopicSession(false,Session.AUTO_ACKNOWLEDGE);

hotDealsTopic = (Topic)jndi.lookup("Hot Deals");

>>>> Failure occurs when the following statement is invoked
subscriber = session.createDurableSubscriber(hotDealsTopic,
"Hot Deals Subscription");
>>>>>


subscriber.setMessageListener(this);
connect.start();

Any feedback would be welcome. I have been investigating this problem for a couple of days now, and I am now officially STUMPED.

Many thanks for your time!
Back to top
View user's profile Send private message Send e-mail
amigupta1978
PostPosted: Thu Aug 29, 2002 7:48 pm    Post subject: Reply with quote

Centurion

Joined: 22 Jan 2002
Posts: 132
Location: India

hi,
did u catch the base MQ exception too,,,,just try to catch that and see...
use

catch (JMSException jmsx)
{

Exception ex= jmsx.getLinkedException();
if (ex!=null) {ex.printStackTrace();}
}
_________________
IBM certified MQseries Specialist
IBM certified WMQI Specialist
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
rgt15442
PostPosted: Fri Aug 30, 2002 7:00 am    Post subject: Reply with quote

Newbie

Joined: 29 Aug 2002
Posts: 7

Ah yes indeed ... here's what I get when I do that.

com.ibm.mq.MQException: Completion Code 2, Reason 2334
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
com.ibm.mq.MQException(int, int, java.lang.Object)
void com.ibm.mq.MQQueue.put(com.ibm.mq.MQMessage, com.ibm.mq.MQPutMessageOptions)
void com.ibm.mq.jms.MQTopicPublisher.publish(javax.jms.Message, int, int, long)
void com.ibm.mq.jms.MQTopicPublisher.publish(javax.jms.Message)
void JMSPubSub.main(java.lang.String [])

Any thoughts?



amigupta1978 wrote:
hi,
did u catch the base MQ exception too,,,,just try to catch that and see...
use

catch (JMSException jmsx)
{

Exception ex= jmsx.getLinkedException();
if (ex!=null) {ex.printStackTrace();}
}
Back to top
View user's profile Send private message Send e-mail
rgt15442
PostPosted: Fri Aug 30, 2002 7:07 am    Post subject: Reply with quote

Newbie

Joined: 29 Aug 2002
Posts: 7

I've noticed others with the same problem have fixed it by "upgrading" to the appropriate MA88 for their installation. I've dowloaded the latest from the supportPac site, and I have MQSeries 5.2.1 installed. Is there a different version of the supportPac that I should be using?

Also, I have now installed the CSD05 (PTF U200095) SupportPac to see if it would make a difference, and the result has NOT changed.

And again, to just reiterate, I've also installed ma0c (specifically ma0c_ntmq52.exe) for the pub/sub function. Again, no improvement. I wonder, should I step it back and try ma0c_nt.zip?

Thanks folks ... these things can be so frustrating. Days can just pass by without resolution!
Back to top
View user's profile Send private message Send e-mail
rgt15442
PostPosted: Fri Aug 30, 2002 10:35 am    Post subject: Resolution found Reply with quote

Newbie

Joined: 29 Aug 2002
Posts: 7

I've found the solution to my problem. I had installed the sun jdk 1.3. As it turns out, the prerequisites state that the IBM jdk is supported (but doesn't mention the sun jdk). Therefore, I installed the IBM jdk, and voila, it's working.


Many thanks for the input provided.

Cheers ...
Back to top
View user's profile Send private message Send e-mail
hello
PostPosted: Mon Sep 09, 2002 11:18 pm    Post subject: Where I can get IBM jdk Reply with quote

Newbie

Joined: 01 Sep 2002
Posts: 6

Where can I get IBM jdk if I also encounter the same problem. Please email me.
_________________
Regards,
HelloWorld
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 » Errors when publishing or subscribing using JMS.
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.