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 » JMS and QAlias

Post new topic  Reply to topic
 JMS and QAlias « View previous topic :: View next topic » 
Author Message
RNStanich
PostPosted: Fri Mar 16, 2007 6:32 am    Post subject: JMS and QAlias Reply with quote

Acolyte

Joined: 23 Apr 2002
Posts: 64

Hi, we're having an issue utilizing alias queues from a JMS application (stand alone I believe as it is not part of a J2EE installation). I've have seen some chatter on this site regarding JMS, alias queues AND clusters, but our issue is different. The other posts dealt with a 2082 error in resolving the baseq; our situation is calling a NameNotFoundException ~ app cannot even find the alias queue. The qmgr is in a cluster, but neither the alias queue, nor the local queue it resolves to are clustered. Both are defined on the local qmgr. Pretty straight forward stuff. If we change the property file to a local queue versus an alias queue, it works fine. And we checked and rechecked stupid errors such as spelling and such. Should the qmgr's name not be part of the API? Recommendations appreciated...

This is a Windows v5.3 CSD10 (although we have tested with CSD13 jar files) set up. Below is a sample output of the error provided by the developer.

Mar 15, 2007 11:49:08 AM com.amica.framework.jms.InboundQueueMgr suspend

SEVERE: Exception occurred attempting to suspend message...message not suspended.

javax.naming.NameNotFoundException: Object CC_MISC_BILLING_REQ_SUSP not found on queue manager CCHUBD

at com.ibm.mq.jms.context.MQContext.lookup(MQContext.java:643)

at com.ibm.mq.jms.context.MQContext.lookup(MQContext.java:609)

at javax.naming.InitialContext.lookup(InitialContext.java:347)

at com.amica.framework.jms.InboundQueueMgr.sendMessage(InboundQueueMgr.java:339)

at com.amica.framework.jms.InboundQueueMgr.suspend(InboundQueueMgr.java:255)

at com.amica.framework.ccintegration.AbstractMessageProcessor.suspendMessage(AbstractMessageProcessor.java:82)

at com.amica.applications.msbilling.MscBillingProcessor.suspendMessage(MscBillingProcessor.java:815)

at com.amica.applications.msbilling.MscBillingProcessor.execute(MscBillingProcessor.java:256)

at com.amica.framework.ccintegration.MessageReceiverImpl.onMessage(MessageReceiverImpl.java:5

at com.amica.framework.jms.InboundQueueMgr$Trigger.run(InboundQueueMgr.java:693)
_________________
Regards, Bob
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Mar 16, 2007 6:36 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Not directly connected to your problem, but are you sure it's the same error under CSD13? CSDs prior to 11 are notorious for their Java support or lack thereof.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
RNStanich
PostPosted: Fri Mar 16, 2007 8:35 am    Post subject: Reply with quote

Acolyte

Joined: 23 Apr 2002
Posts: 64

Yes Victor, same error...
I do have some additional information. Looks like the developer is creating a standard, out of the box INITIAL_CONTEXT_FACTORY. Snippet here:

//Create a JNDI API InitialContext object and populate

Properties env = new Properties();

env.put(Context.INITIAL_CONTEXT_FACTORY, initialContextFactory);

env.put(Context.PROVIDER_URL, providerURL);

jndiContext = new InitialContext( env );



//Look up connection factory and queue

queueConnectionFactory = (QueueConnectionFactory)jndiContext.lookup(queueManager);

queue = (Queue)jndiContext.lookup(queueName);
***************
The lookup for the queueManager is successful. It is the lookup of the queueName that fails, but it is successful if the queue is a local queue.
The developer did find something called a "createQueue" that works in place of the jndiContext.lookup, but you have to identify the queue you are looking for; defeats the purpose of the JNDI lookup...
_________________
Regards, Bob
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Mar 16, 2007 5:20 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The developer needs to make sure that they are not trying to read from queues that are not qlocals to the qmgr they are connected to.

So, for example, specifying a QREMOTE as the Queue Destination for an MDB Listener port will not work.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Mar 16, 2007 8:56 pm    Post subject: Reply with quote

Grand High Poobah

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

From the previous posts it looks like this is a JNDI definition problem.
The exception being javax.naming.... and as such the alias queue is never found in the context, maybe because it was never put there.

Hint even an alias queue is inserted in the base queue field name in JNDI as you declare an identifier name, a jndi name, and finally the base name (read MQ name) for the queue...

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
RNStanich
PostPosted: Wed Mar 21, 2007 4:05 am    Post subject: Reply with quote

Acolyte

Joined: 23 Apr 2002
Posts: 64

Wow fjb, I have no idea what your last paragraph means...

Hint even an alias queue is inserted in the base queue field name in JNDI as you declare an identifier name, a jndi name, and finally the base name (read MQ name) for the queue...

but I will pass it along; probably means something to our developers...Thank you
_________________
Regards, Bob
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 » JMS and QAlias
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.