Author |
Message
|
anilg5 |
Posted: Mon Dec 15, 2008 5:23 am Post subject: MQClient programing halting after executing the put message. |
|
|
Newbie
Joined: 15 Dec 2008 Posts: 3
|
Hi,
I have written the MQ Client Program using the Java.
When i run that program it is halting the in the below line.
MQQueue queue = new MQQueue("TEST");
// Halting the execution in the below line.
queue.put(new MQMessage(b), new MQPutMessageOptions())
I have setup the classpath and included the below directories.
:/opt/mqm/java/lib/com.ibm.mq.jar:
/opt/mqm/java/lib/connector.java:
/opt/mqm/java/lib:/opt/mqm/java/lib64:
I am not getting any error. But not coming out of the program and just halting.
I am new to mqseries and trying mybest to implement this using the java programing.
anyhelp or suggestion will be high greatfull. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Dec 15, 2008 5:28 am Post subject: Re: MQClient programing halting after executing the put mess |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
anilg5 wrote: |
I am not getting any error. |
Not even when connecting to the queue manager?
anilg5 wrote: |
I am new to mqseries and trying mybest to implement this using the java programing. |
Have you considered using JMS? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Dec 15, 2008 7:33 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Quote: |
:/opt/mqm/java/lib/com.ibm.mq.jar:
/opt/mqm/java/lib/connector.java:
/opt/mqm/java/lib:/opt/mqm/java/lib64:
|
You should not mix 32 bit and 64 bit jars and processing.
So make sure you have all the jars on the classpath in <mqinstall>/java/lib. You might want to have that <mqinstall>/java/lib or <mqinstall>/java/lib64 path if you are running 64 bit java on your libpath or ld_library_path or equivalent as well.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
anilg5 |
Posted: Mon Dec 15, 2008 6:15 pm Post subject: |
|
|
Newbie
Joined: 15 Dec 2008 Posts: 3
|
Thanks for your suggestions.
Now in my classpath referring only 64 bit mqjms java libraries.
When i ran the program message received on the remote queue on the mqserver side , but the MQQueue.put() method not returning.
we can see on the server side message received but my program halting because of that put method not returning.
Give me some help / suggestions here.
(We haven't tried JMS becase that required JNDI environment setup and some kind of mapping to Mq objects.) |
|
Back to top |
|
 |
Vitor |
Posted: Tue Dec 16, 2008 1:22 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
anilg5 wrote: |
(We haven't tried JMS becase that required JNDI environment setup and some kind of mapping to Mq objects.) |
Really?
The mapping thing with the JMSAdmin tool is so easy even I can do it.
But I know nothing about Java. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Dec 16, 2008 3:08 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
anilg5 wrote: |
Thanks for your suggestions.
Now in my classpath referring only 64 bit mqjms java libraries. |
Really? Then you have a problem. Because the 64 bit directory does not contain any JAR files only different libraries/dlls that should be on the LIBPATH. And your java version is 64 bit? What does java -version say?
Show us the output of
java -version
echo $CLASSPATH
echo $LIBPATH
echo $LD_LIBRARY_PATH
anilg5 wrote: |
When i ran the program message received on the remote queue on the mqserver side , but the MQQueue.put() method not returning.
we can see on the server side message received but my program halting because of that put method not returning.
Give me some help / suggestions here.
(We haven't tried JMS becase that required JNDI environment setup and some kind of mapping to Mq objects.) |
Back to Vitor's suggestion: setting up the environment for JMS is really simple, whether running a stand alone JMS program or in a server.
For beginners I suggest the use of a file based JNDI.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|