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 » MQClient programing halting after executing the put message.

Post new topic  Reply to topic
 MQClient programing halting after executing the put message. « View previous topic :: View next topic » 
Author Message
anilg5
PostPosted: Mon Dec 15, 2008 5:23 am    Post subject: MQClient programing halting after executing the put message. Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Mon Dec 15, 2008 5:28 am    Post subject: Re: MQClient programing halting after executing the put mess Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Dec 15, 2008 7:33 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
anilg5
PostPosted: Mon Dec 15, 2008 6:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Tue Dec 16, 2008 1:22 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Tue Dec 16, 2008 3:08 am    Post subject: Reply with quote

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
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 » MQClient programing halting after executing the put message.
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.