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

Post new topic  Reply to topic
 mqjbnd02 « View previous topic :: View next topic » 
Author Message
lecmns
PostPosted: Thu Dec 27, 2001 5:17 am    Post subject: Reply with quote

Apprentice

Joined: 26 Dec 2001
Posts: 36

Guys..

Please help me out..
I am trying to execute a very basic Java code in Windows NT on MQSeries 5.2. But it is thrownnig this exception

Exception in thread "main" java.lang.UnsatisfiedLinkError: no mqjbnd02 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1312)
at java.lang.Runtime.loadLibrary0(Runtime.java:749)
at java.lang.System.loadLibrary(System.java:820)
at com.ibm.mq.server.MQSESSION.(MQSESSION.java:145)
at com.ibm.mq.MQSESSIONServer.getMQSESSION(MQSESSIONServer.java:67)
at com.ibm.mq.MQSESSION.getSession(MQSESSION.java:241)
at com.ibm.mq.MQManagedConnectionJ11.(MQManagedConnectionJ11.java:148)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11._createManagedConnection(MQBindingsManag
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11.createManagedConnection(MQBindingsManage
at com.ibm.mq.StoredManagedConnection.(StoredManagedConnection.java:80)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java:15
at com.ibm.mq.MQQueueManager.obtainBaseMQQueueManager(MQQueueManager.java:649)
at com.ibm.mq.MQQueueManager.construct(MQQueueManager.java:598)
at com.ibm.mq.MQQueueManager.(MQQueueManager.java:375)
at MQDemoOne.main(MQDemoOne.java:14)

I have been trying to find out the prob..
but not much successful so far..

I have my MQ installed in D drive..

following in a part of the classpath I have..
d:MQSeriesjavabin;d:MQSeriesjavalib;D:jarsjta.jar;D:jarscom.ibm.mq.jar;

what could be the reason?

Please help me out as I gotta get this code working asap..

Are there anything else I need to look into regarding this? If yes, please let me know.

and I searched for mqjbnd02 all over my machine, but in vein..

Thankx in advance..
regards

MNS
Back to top
View user's profile Send private message
kolban
PostPosted: Thu Dec 27, 2001 8:02 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

Is there a queue manager on the same machine as your Java program and MA88 Java support? If not, the problem is that you are attempting to use server bindings to connect to a queue manager which doesn't exist and hence must inform the application that it is a client and should form a channel to the queue manager.

If there is a local queue manager, please ensure that the mqjbnd02.dll file is in your PATH environment variable setting. It is usually found in the /bin folder.
Back to top
View user's profile Send private message
lecmns
PostPosted: Thu Dec 27, 2001 9:08 pm    Post subject: Reply with quote

Apprentice

Joined: 26 Dec 2001
Posts: 36

Thankx for that reply, Kolban

but I do have a queueManager in the very same machine. I installed ma88 Java support too eventhough I don't know where in my machine it got installed as it never asked me anything. So I guess it automatically found the MQ Folder and went ahead.

Please see the code below..
I don't think I am trying to bind

**************
String qManager = "QM_tarang212";

try {

MQQueueManager queueManager=new MQQueueManager(qManager);

int openOptions2to1 =MQC.MQOO_INPUT_AS_Q_DEF |MQC.MQOO_OUTPUT ;
int openOptions1to2 =MQC.MQOO_INPUT_AS_Q_DEF |MQC.MQOO_OUTPUT ;

MQQueue OnetoTwo = null;
MQQueue TwotoOne = null;

try {

//creating two new queues.. one as a sender queue from One to Two..
//one as a receiver queue from Two to One..
OnetoTwo = new MQQueue(queueManager,"OnetoTwo",openOptions1to2,"QM_tarang212","dynamicQName","altUserId");
TwotoOne = new MQQueue(queueManager,"TwotoOne",openOptions2to1,"QM_tarang212","dynamicQName","altUserId");

System.out.println("MQDemoOne : queues created for the first time");

} catch (Exception et) {

System.out.println("MQDemoOne : ERROR 01 : "+et);

OnetoTwo = queueManager.accessQueue("OnetoTwo",openOptions2to1,"QM_tarang212",null,null);
TwotoOne = queueManager.accessQueue("TwotoOne",openOptions2to1,"QM_tarang212",null,null);

System.out.println("MQDemoOne : queues already created, hence accessing them");
}

//putting messages One to Two with a tag
MQMessage hello_world =new MQMessage();
hello_world.putApplicationName = "TMAP1.2";
hello_world.writeUTF("First message from MQDemoOne");
MQPutMessageOptions pmo =new MQPutMessageOptions();
OnetoTwo.put(hello_world,pmo);
System.out.println("MQDemoOne : message put into the queue OnetoTwo");

//getting messages from Two to One with a tag
MQMessage retrievedMessage =new MQMessage();
retrievedMessage.putApplicationName ="Adapters";
MQGetMessageOptions gmo =new MQGetMessageOptions();
TwotoOne.get(retrievedMessage,gmo);
System.out.println("MQDemoOne : message retrieved from queue TwotoOne");
String msgText =retrievedMessage.readUTF();
System.out.println("MQDemoOne : The message is:"+msgText);

//closing all the queues and the queueManager
OnetoTwo.close();
TwotoOne.close();
queueManager.disconnect();
System.out.println("MQDemoOne : queues and queueManager closed");

} catch (Exception er) {
System.out.println("MQDemoOne : ERROR 02 : "+er);
}//try
**************

It is this line that is bombing..

- MQQueueManager queueManager=new MQQueueManager(qManager);

I am not that good with MQ.. but a newbie..
so, sorry if this question is a blunder...
Is there something to be started in MQ? MQExplorer says, the default queueManager has three queues - "clq_default_tarang212","default" and "postcard". There are two channels - "S_tarang212" and "TO_QM_tarang212"..

but is a channel required always if it's in the same machine?

Please enlighten me on this..
I am getting confused..

but again, I have not found that dll in my machine so far

MNS
Back to top
View user's profile Send private message
lecmns
PostPosted: Thu Dec 27, 2001 9:35 pm    Post subject: Reply with quote

Apprentice

Joined: 26 Dec 2001
Posts: 36

Is there a queue manager on the same machine as your Java program and MA88 Java support? If not, the problem is that you are attempting to use server bindings to connect to a queue manager which doesn't exist and hence must inform the application that it is a client and should form a channel to the queue manager.

If there is a local queue manager, please ensure that the mqjbnd02.dll file is in your PATH environment variable setting. It is usually found in the /bin folder.


Thankx for that speedy reply, Kolban..

but I do have a local QueueManager in the very same machine
and I am trying to create two queues under that manager

here is the code I am using
I really doubt if I am trying to bind in my code..
since Queuemanager is in the4 same machine, do I need a channel to communicate?
please enlighten me on this..

below is the code I am trying to execute

******************

String qManager = "QM_tarang212";

try {

MQQueueManager queueManager=new MQQueueManager(qManager);

System.out.println("MQDemoOne : queueManager created");

int openOptions2to1 =MQC.MQOO_INPUT_AS_Q_DEF |MQC.MQOO_OUTPUT ;
int openOptions1to2 =MQC.MQOO_INPUT_AS_Q_DEF |MQC.MQOO_OUTPUT ;

System.out.println("MQDemoOne : openOptions created");

MQQueue OnetoTwo = null;
MQQueue TwotoOne = null;

try {

//creating two new queues.. one as a sender queue from One to Two..
//one as a receiver queue from Two to One..
OnetoTwo = new MQQueue(queueManager,"OnetoTwo",openOptions1to2,"QM_tarang212","dynamicQName","altUserId");
TwotoOne = new MQQueue(queueManager,"TwotoOne",openOptions2to1,"QM_tarang212","dynamicQName","altUserId");

System.out.println("MQDemoOne : queues created for the first time");

} catch (Exception et) {

System.out.println("MQDemoOne : ERROR 01 : "+et);

OnetoTwo = queueManager.accessQueue("OnetoTwo",openOptions2to1,"QM_tarang212",null,null);
TwotoOne = queueManager.accessQueue("TwotoOne",openOptions2to1,"QM_tarang212",null,null);

System.out.println("MQDemoOne : queues already created, hence accessing them");
}

//putting messages One to Two with a tag
MQMessage hello_world =new MQMessage();
hello_world.putApplicationName = "TMAP1.2";
hello_world.writeUTF("First message from MQDemoOne");
MQPutMessageOptions pmo =new MQPutMessageOptions();
OnetoTwo.put(hello_world,pmo);
System.out.println("MQDemoOne : message put into the queue OnetoTwo");

//getting messages from Two to One with a tag
MQMessage retrievedMessage =new MQMessage();
retrievedMessage.putApplicationName ="Adapters";
MQGetMessageOptions gmo =new MQGetMessageOptions();
TwotoOne.get(retrievedMessage,gmo);
System.out.println("MQDemoOne : message retrieved from queue TwotoOne");
String msgText =retrievedMessage.readUTF();
System.out.println("MQDemoOne : The message is:"+msgText);

//closing all the queues and the queueManager
OnetoTwo.close();
TwotoOne.close();
queueManager.disconnect();
System.out.println("MQDemoOne : queues and queueManager closed");

} catch (Exception er) {
System.out.println("MQDemoOne : ERROR 02 : "+er);
}//try
******************

This is the line that's bombing..

MQQueueManager queueManager=new MQQueueManager(qManager);

I have not yet found that dll in my machine..
but I have installed Java classes for MQSeries.. ie., the MA88
below are the files in my bin folder.. no dll there..

formatLog.bat
IVTRun.bat
IVTSetup.bat
IVTTidy.bat
JMSAdmin.bat
JMSAdmin.config
MQJMS_PSQ.mqsc
PSIVTRun.bat
PSReportDump.class
runjms.bat

are we expecting more files in this folder? please let me know...

below are the files in my lib folder

com.ibm.mq.iiop.jar
com.ibm.mq.jar
com.ibm.mqbind.jar
com.ibm.mqjms.jar
fscontext.jar
jdbc
jms.jar
jndi.jar
jta.jar
ldap.jar
mqjbnd02.dll
mqji.properties
mqji_de.properties
mqji_en.properties
mqji_en_US.properties
mqji_es.properties
mqji_fr.properties
mqji_it.properties
mqji_ja.properties
mqji_ko.properties
mqji_pt.properties
mqji_zh_CN.properties
mqji_zh_TW.properties
MQXAi01.dll
providerutil.jar

I am thoroughly confused I guess
please help me out..

Thankx in advance..

MNS
Back to top
View user's profile Send private message
lecmns
PostPosted: Thu Dec 27, 2001 9:37 pm    Post subject: Reply with quote

Apprentice

Joined: 26 Dec 2001
Posts: 36

Oops.. sorry.. first time when i posted the reply, I thought it didn't go through.. but second time, Kolban's message was athe part of my reply.. sorry for that...

MNS but please do help me..
Back to top
View user's profile Send private message
kolban
PostPosted: Thu Dec 27, 2001 9:42 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

In your last posting you did a directory listing of the lib folder. There you see the mqjbnd02.dll

You need to ensure that the lib folder is in your PATH environment variable. I think if you look really closely at the Using Java manual you will find that is a manual setup item.

Also, use the search feature of this mqseries.net bulletin board an use "mqjbnd02" as the keyword. I think there were a number of previous asks and answered on this subject
Back to top
View user's profile Send private message
lecmns
PostPosted: Thu Dec 27, 2001 11:30 pm    Post subject: Reply with quote

Apprentice

Joined: 26 Dec 2001
Posts: 36

Oops.. )

sorry.. I never noticed that..
but how come when i gave a machine complete search, it never got listed? confusing..

anyway, thankx for that..

MNS
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 » mqjbnd02
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.