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 » no mqjbnd05 in java.library.path

Post new topic  Reply to topic
 no mqjbnd05 in java.library.path « View previous topic :: View next topic » 
Author Message
mathew_m
PostPosted: Tue Nov 13, 2007 5:43 am    Post subject: no mqjbnd05 in java.library.path Reply with quote

Novice

Joined: 14 Oct 2007
Posts: 11

I am using JAVA code to connect my MQSERVER. Both server and client are in WINDOWS platform. But while running my JSP i am getting the follwoing error. I could not find the file called mqjbnd05 in my system where client is installed. Any help ?

java.lang.UnsatisfiedLinkError: no mqjbnd05 in java.library.path
java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
java.lang.Runtime.loadLibrary0(Runtime.java:822)
java.lang.System.loadLibrary(System.java:992)
com.ibm.mq.MQSESSION.loadLib(MQSESSION.java:1088)
com.ibm.mq.server.MQSESSION$1.run(MQSESSION.java:232)
java.security.AccessController.doPrivileged(Native Method)
com.ibm.mq.server.MQSESSION.<clinit>(MQSESSION.java:226)
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Nov 13, 2007 5:56 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Are you trying to create a bindings connection or a client connection?

If you're creating a bindings connection, are you sure all the paths are set correctly? If it's a client connection, have you done a client installation or just put the jar files in the path?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mathew_m
PostPosted: Tue Nov 13, 2007 6:00 am    Post subject: Reply with quote

Novice

Joined: 14 Oct 2007
Posts: 11

This is a client connection. I have downloaded(trial version) mq windows client and installed in my machine.

I could not locate the file mqjbnd05 in my PC !

Pls help
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Nov 13, 2007 6:06 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You're trying to establish a bindings connection.

You need to change your code to create a client connection, instead.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Nov 13, 2007 6:07 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mathew_m wrote:
This is a client connection. I have downloaded(trial version) mq windows client and installed in my machine.


For the record, I suspect that's the full client. I'm not aware of a trial version of the client, only the server package.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mathew_m
PostPosted: Tue Nov 13, 2007 6:24 am    Post subject: Reply with quote

Novice

Joined: 14 Oct 2007
Posts: 11

Please dont beat me up
I used the following code(class). Could you suggest what changes i should make it to create a client connection ?


import com.ibm.mq.*; // Include the MQ package
import java.io.*;
import java.lang.*;

public class MQClass {

public MQMessage myMessage = new MQMessage();


private MQQueueManager qMgr;


/**********************************************************/
/* This program doesn't have any specific initialization. */
/* If it did, it could go here. */
/**********************************************************/
public void init() {


}

public void start() {
try {
qMgr = new MQQueueManager("Q1MGRVIN");

int openOptions = MQC.MQOO_INPUT_EXCLUSIVE | MQC.MQOO_BROWSE;

MQQueue myQueue = qMgr.accessQueue("Q1", openOptions,
null, null, null);

MQGetMessageOptions gmo = new MQGetMessageOptions();
gmo.options = MQC.MQGMO_WAIT | MQC.MQGMO_BROWSE_FIRST;
// MQMessage myMessage = new MQMessage();

boolean done = false;
do {
try {

myMessage.clearMessage();
myMessage.correlationId = MQC.MQCI_NONE;
myMessage.messageId = MQC.MQMI_NONE;

myQueue.get(myMessage, gmo);
String msg = myMessage.readString(myMessage.getMessageLength());
System.out.println("Actually getting the message");
gmo.options = MQC.MQGMO_MSG_UNDER_CURSOR;
myQueue.get(myMessage, gmo);
System.out.println(myMessage);
done = true;


gmo.options = MQC.MQGMO_WAIT | MQC.MQGMO_BROWSE_NEXT;
} catch (MQException ex) {

done = true;
} catch (java.io.IOException ex) {
System.out.println("Java exception: " + ex);
done = true;
}

} while (!done);


/**********************************************************/
/* Before the program ends, the open queue will be closed */
/* and the queue manager will be disconnected. */
/**********************************************************/
myQueue.close();
qMgr.disconnect();
}
catch (MQException ex) {
System.out.println("MQ exception: CC = " + ex.completionCode
+ " RC = " + ex.reasonCode);
}
}

}
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Nov 13, 2007 6:34 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mathew_m wrote:
Please dont beat me up


This is nothing. When we start to beat you up, you'll know....

I'd use one of the methods in the Using Java manual or the Clients manual to establish that your application should use a client connection. An MQEnvironment object for example (but only as an example - select the method which best meets your requirements)
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Nov 13, 2007 6:56 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Yes. The basics are you need to set MQEnvironment.port, MQEnvironment.hostname and MQEnvironment.channel.

And then use
Code:
new MQQueueManager()
.

Start with Using Java or the samples.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
bower5932
PostPosted: Tue Nov 13, 2007 7:01 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

mqhash.java at

http://www-304.ibm.com/jct09002c/isv/tech/sampmq.html

uses a hash table to set the client environment. The manuals will give you other examples.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » no mqjbnd05 in java.library.path
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.