urgent::problem while running a java file which is writtten using ibm mqseries classes for java.
3 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   praksh_babu
Posted On:   Friday, June 22, 2001 02:57 AM

i have a written a class which simply puts a normal string message to the default queue and which will read back the message. i am able to successfully compile the file.but while i am trying to run the class file it throws the follwing Exception.the program is written using ibm mqseries binding mode; default_queue architecture; the EXCEPTION I GOT WAS: Exception in thread "main" java.lang.UnsatisfiedLinkError: no mqjbn02 in java.library.path; i dont know what mqjbn02 implies since i am working with mqseries at very first time since i require the answer immediatley pls send the reply soon.    More>>

i have a written a class which simply puts a normal string message to the default queue and which will read back the message. i am able to successfully compile the file.but while i am trying to run the class file it throws the follwing Exception.the program is written using ibm mqseries binding mode;
default_queue architecture;

the EXCEPTION I GOT WAS:

Exception in thread "main"
java.lang.UnsatisfiedLinkError:
no mqjbn02 in java.library.path;

i dont know what mqjbn02 implies since i am working with mqseries at very first time

since i require the answer immediatley pls send the reply soon.

   <<Less

Re: urgent::problem while running a java file which is writtten using ibm mqseries classes for java.

Posted By:   arun_rajak  
Posted On:   Monday, July 16, 2001 11:15 AM

I was too getting the same error when i started first. You just go to C:Program FilesIBMMQSeriesJavalib, there you will find mqjbn02.dll. you add "C:Program FilesIBMMQSeriesJavalib" to your path then try. if you still get the problem then you also add "C:Program FilesIBMMQSeriesJavalibmqjbn02.dll"to your classpath. This will solve your problem.

Re: urgent::problem while running a java file which is writtten using ibm mqseries classes for java.

Posted By:   Nicholas_Whitehead  
Posted On:   Saturday, June 23, 2001 05:51 AM

MQSeries JMS clients work in two different modes:


  1. Client Binding: This uses a remote connection pattern and can be used to connect to a local or remote QM.

  2. Java Binding: Uses a native connection to the MQSeries QM and only works on the same host as the QM you are connecting to.


The Java Binding is the only one I have seen get a link unsatisfied error, since the Client Binding does not use any native code.

If you are running on the same host as the QM, you need to add the bin directory of MQ to the PATH/LD_LIBRARY_PATH (not sure what platform you are on....

If not, you need to make sure you are using Client Binding. This can be done using a method in the QueueConnectionFactory:


  • Java Binding: setTransportType(JMSC.MQJMS_TP_BINDINGS_MQ)
  • Client Binding: setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP)

If you are not interfacing with the MQ ConnectionFactory directly, then you are probably retrieving it from JNDI, in which case you must modify the ConnectionFactory in your JNDI store.

//Nicholas

Re: urgent::problem while running a java file which is writtten using ibm mqseries classes for java.

Posted By:   Vasu_Devan  
Posted On:   Friday, June 22, 2001 03:59 AM

Seems like some configuration problem.
I hope you have created a ServerConnection channel and it is running. Instead of using the default queue, try creating your own queue. Make sure you specify the correct hostname,port, serverconnection channel,queue manager and queue name in your java program.
About | Sitemap | Contact