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 » MQJMS2008

Post new topic  Reply to topic Goto page 1, 2  Next
 MQJMS2008 « View previous topic :: View next topic » 
Author Message
lecmns
PostPosted: Sat Dec 29, 2001 4:04 am    Post subject: Reply with quote

Apprentice

Joined: 26 Dec 2001
Posts: 36

Hey Guys..

I am trying to run a MQ JMS Client

It's using JNDI to look up for MQQueueConnectionFactory and Queue.

It's making a Context with INITIAL_CONTEXT_FACTORY as "com.sun.jndi.fscontext.RefFSContextFactory" and PROVIDER_URL as "file://192.168.2.169/C:/Program Files/IBM/MQSeries/Java".

It's making an MQQueueConnectionFactory with the parameters from JNDI like the following

PORT(1414)
HOSTNAME(192.168.2.169)
QMANAGER(QM_samit)
USECONNPOOLING(YES)
CCSID(819)
MSGBATCHSZ(10)
TEMPMODEL(SYSTEM.DEFAULT.MODEL.QUEUE)
TRANSPORT(CLIENT)
SYNCPOINTALLGETS(NO)
MSGRETENTION(YES)
POLLINGINT(5000)
VERSION(2)
CHANNEL(S_samit)

Then it's creating a QueueConnection and also a QueueSession as createQueueSession(true,Session.AUTO_ACKNOWLEDGE).

It then creates a Queue with parameters from JNDI which are as follows

PRIORITY(APP)
CCSID(1208)
EXPIRY(APP)
QMANAGER(QM_samit)
PERSISTENCE(APP)
ENCODING(NATIVE)
TARGCLIENT(JMS)
VERSION(1)

It's giong till this point and then it's failing in the following line

sender = session.createSender(ioQueue);

the error is as follows ..

javax.jms.JMSException: MQJMS2008: failed to open MQ queue
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironm
ent.java:418)
at com.ibm.mq.jms.MQQueueSession.getOutputQueue(MQQueueSession.java:726)

at com.ibm.mq.jms.MQQueueSession.createSender(MQQueueSession.java:179)
at test02.(test02.java:104)
at test02.main(test02.java:130)
test02 : ERROR = MQJMS2008: failed to open MQ queue

Guys.. what could be the problem?
I am trying all ways to solve it.. but not making much sense to me..

am I not doing something that's required?
have I not done something required in the MQ server?
what could be wrong?

Guys.. help me out..
I am confused..

Thankx in advance..
MNS
Back to top
View user's profile Send private message
lecmns
PostPosted: Sat Dec 29, 2001 4:13 am    Post subject: Reply with quote

Apprentice

Joined: 26 Dec 2001
Posts: 36

what's exactly this "MQRC_CHAR_ATTRS_TOO_SHORT"?

The Return code 2008 says that I'll probably have to set a larger value for 'CharAttrLength'!!

But how do I set this?
I have not set such a thing so far in my code.
Is there a default value for this?

This is a continuation of the above posting..

Hope you can help me out..

MNS
Back to top
View user's profile Send private message
EddieA
PostPosted: Wed Jan 02, 2002 10:58 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

The return code is NOT 2008.

You need to look at the linked exception, in the JMSException, to find the MQSeries Return and Reason codes.

Cheers,

_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
kishoret
PostPosted: Fri Jan 18, 2002 3:05 pm    Post subject: Reply with quote

Newbie

Joined: 07 Jan 2002
Posts: 4

My code also fails at the same statement. In my case, if a give a local queue name , it is working ok . If I give a cluster queue name in JNDI, it is failing at the session.createSender(QUEUE) and giving the reason code 2085.
I would appreciate if any one could throw some light on this ..

Kishore
Back to top
View user's profile Send private message
kanagavisu
PostPosted: Fri Feb 08, 2002 11:28 am    Post subject: Reply with quote

Newbie

Joined: 01 Feb 2002
Posts: 9
Location: 432 Hardings place Fairview NJ

i am also having same problem
Back to top
View user's profile Send private message
EddieA
PostPosted: Fri Feb 08, 2002 2:37 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

2085 = Object not found. Can't resolve the Queue Name.

Search the forums for 2085. There's already enough replies out there that tell you what to look for.

Cheers,

_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
eswarnv
PostPosted: Sat Feb 09, 2002 1:23 am    Post subject: Reply with quote

Voyager

Joined: 20 Dec 2001
Posts: 88

Hi lecmns,

Try out by giving QUEUE(<queue-name)> property while binding to Naming Server along with whatever the properties u had set fallows.
QUEUE(<name of the physical queue).
PRIORITY(APP)
CCSID(1208)
EXPIRY(APP)
QMANAGER(QM_samit)
PERSISTENCE(APP)
ENCODING(NATIVE)
TARGCLIENT(JMS)
VERSION(1)

Hope this will solve ur problem..

Thanks
eswar
Back to top
View user's profile Send private message
asiufy
PostPosted: Tue Jun 04, 2002 9:46 am    Post subject: Reply with quote

Newbie

Joined: 09 Sep 2001
Posts: 5

kishoret wrote:
My code also fails at the same statement. In my case, if a give a local queue name , it is working ok . If I give a cluster queue name in JNDI, it is failing at the session.createSender(QUEUE) and giving the reason code 2085.
I would appreciate if any one could throw some light on this ..

Kishore


Anybody found a solution for this problem? I'm in the exact same situation: if I use a local queue, the code works, but if I use a cluster queue, it fails.

I have searched for '2085', and not a single thread came up...

Thanks,
Alex.
Back to top
View user's profile Send private message
mrlinux
PostPosted: Tue Jun 04, 2002 10:01 am    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

what is the queue manager name that is getting used ??? you need to use "" which will pick up the default queue manager.
_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
asiufy
PostPosted: Tue Jun 04, 2002 11:39 am    Post subject: Reply with quote

Newbie

Joined: 09 Sep 2001
Posts: 5

mrlinux wrote:
what is the queue manager name that is getting used ??? you need to use "" which will pick up the default queue manager.


Can't use "" for queue manager name... Here's what I get:

Code:
MQJE001: Completion Code 2, Reason 2058
Could not create queue connection: javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for '""'


I'm using a local queue manager name. Everything works fine if I only map to local queues. If I define just one cluster queue, I get an error.
Back to top
View user's profile Send private message
mrlinux
PostPosted: Tue Jun 04, 2002 5:46 pm    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

Is the queue manager setup as the default queue manager ????
quick test can you do runmqsc without specifing the queue manager
_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
bdrummond
PostPosted: Mon Jun 28, 2004 2:12 am    Post subject: Reply with quote

Disciple

Joined: 06 May 2004
Posts: 164

I am getting the same error when trying to open and put a message on a clustered queue (sitting on another QM) but no error when using a local queue.
We do not use default QM's so putting "" in this field would not work.
Does anyone have any ideas, help on this..?
Back to top
View user's profile Send private message
EddieA
PostPosted: Mon Jun 28, 2004 9:05 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

If it's clustered queue, then you cannot specify the QM. From the manual:
Quote:
When sending a message to a cluster, leave the Queue Manager field in the JMS Queue object blank. This enables an MQOPEN to be performed in BIND_NOT_FIXED mode, which allows the queue manager to be determined. Otherwise an exception is returned reporting that the queue object cannot be found. This applies when using JNDI or defining queues at runtime


Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Mon Jun 28, 2004 11:09 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Then how could a JMS application reply to a specific Reply2Queue/Reply2QueueManager? That quote makes it seem that you cannot specifically address a particular QM in a cluster, which is a requirement if the JMS app is a Replying app.

http://www.mqseries.net/phpBB2/viewtopic.php?t=12350&highlight=
My testing showed that you could do this, and that the manual had a bad description for that property. Eddie, maybe that quote you posted is wrong also? Or can you really not use JMS apps for repliers in a cluster?
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
vennela
PostPosted: Mon Jun 28, 2004 12:13 pm    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

PeterPotkay wrote:
Then how could a JMS application reply to a specific Reply2Queue/Reply2QueueManager? That quote makes it seem that you cannot specifically address a particular QM in a cluster, which is a requirement if the JMS app is a Replying app.


From chapter 13 of the Java manual, JMSReplyTo field can be used for Reply2Queue/Reply2QueueManager properties.

Peter, in the thread you mentioned above, the QMNAME filed is used where you can specify a QMANAGER ALIAS. For CLUSTER queues, it doesn't make sense to use the QMNAME field I guess.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ Java / JMS » MQJMS2008
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.