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 IndexGeneral IBM MQ SupportSending a msg to a queue using Java

Post new topicReply to topic
Sending a msg to a queue using Java View previous topic :: View next topic
Author Message
Matrin
PostPosted: Thu Feb 14, 2008 6:09 am Post subject: Sending a msg to a queue using Java Reply with quote

Novice

Joined: 14 Feb 2008
Posts: 10

Hello folks

I’m a newbie to the field of JAVA programming as well as this forum therefore you can imagine how desperate I am to get a solution.

Here is the scenario:

My Java application is trying to put a message in an MQ Queue. When executing the program I get the following exception:

java.lang.UnsatisfiedLinkError: no mqjbnd04 in java.library.path


I have checked my “CLASSPATH” environmental variable, it contains the following:

C:\Program Files\IBM\WebSphere MQ\Java\lib\providerutil.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ibm.mqjms.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\ldap.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\jta.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\jndi.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\jms.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\connector.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\fscontext.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ibm.mq.jar

NOW, I believe the above error somehow relates to the class path or some library referencing in my application.

Appreciate your response, comments and/or leading thoughts
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Feb 14, 2008 6:10 am Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You are trying to establish a bindings connection on a machine with only the client installed.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Feb 14, 2008 6:54 am Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Quote:
java.lang.UnsatisfiedLinkError: no mqjbnd04 in java.library.path

And I wonder with what antiquated version of the client.../ server libraries.
IIRC since V5.3 it should be complaining about mqjbnd05...

_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Matrin
PostPosted: Fri Feb 15, 2008 2:51 am Post subject: Reply with quote

Novice

Joined: 14 Feb 2008
Posts: 10

Thanks for your replies folks..

jefflowrey, what exactly should be installed on the machine ?
and would the version have any effect ?

Thanks again
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Feb 15, 2008 2:59 am Post subject: Reply with quote

Grand High Poobah

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

Matrin wrote:
jefflowrey, what exactly should be installed on the machine ?


It should be the latest version of whichever software you're trying to use (either the client or the queue manager).

Matrin wrote:

and would the version have any effect ?


The latest version doesn't allow a bindings connection on a client only machine, no.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Matrin
PostPosted: Sat Feb 16, 2008 12:09 am Post subject: Reply with quote

Novice

Joined: 14 Feb 2008
Posts: 10

Hi Vitor,

Thanks for the clarification, just to clear out any confusion, here are the details of the MQ and Java installed on the machine having the problem..

- IBM Websphere MQ version 5.30.0

JAVA:
- J2SE Runtime Environment 5.0 update 6
- Java 2 Runtime Environment, SE v1.4.2_07
- Java 2 Runtime Environment, SE v.1.4.2_13
- Java 2 SDK, SE v1.4.2_13
- Java 6 update 3

I am currently confuesd with what Java verion should be used, and what is actually needed to get this work

Thanks again
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Sat Feb 16, 2008 5:37 am Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You should not be using WebSphere MQ v5.3.0.

Or v5.3.xxxx of any kind.

You should be using WebSphere MQ v6.

You should then go to the InfoCenter and read the section/manual called "Using Java" to understand the difference between a client connection and a bindings connection.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Sat Feb 16, 2008 2:55 pm Post subject: Reply with quote

Grand High Poobah

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

Matrin wrote:
Thanks for the clarification, just to clear out any confusion, here are the details of the MQ and Java installed on the machine having the problem..

- IBM Websphere MQ version 5.30.0


But you still don't clarify if this is a client or a queue manager

But upgrade to v6!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Matrin
PostPosted: Sat Feb 16, 2008 9:09 pm Post subject: Reply with quote

Novice

Joined: 14 Feb 2008
Posts: 10

Vitor wrote:
Matrin wrote:
Thanks for the clarification, just to clear out any confusion, here are the details of the MQ and Java installed on the machine having the problem..

- IBM Websphere MQ version 5.30.0


But you still don't clarify if this is a client or a queue manager

But upgrade to v6!


Well, we are trying to connect from a normal machine (PC) to an MQ manager server..
Back to top
View user's profile Send private message
Matrin
PostPosted: Sun Feb 17, 2008 2:21 am Post subject: Reply with quote

Novice

Joined: 14 Feb 2008
Posts: 10

jefflowrey wrote:
You are trying to establish a bindings connection on a machine with only the client installed.


Hey Jeff,
well, we are trying to connect to a server where MQ manager is installed. On the machine we use to try to connect to MQ we've installed MQ websphere (client), so we have to install something else ?? and if yes, what exactly ? because i am not clear with this !

Thanks again for your help
Back to top
View user's profile Send private message
Vitor
PostPosted: Sun Feb 17, 2008 5:24 am Post subject: Reply with quote

Grand High Poobah

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

Matrin wrote:
well, we are trying to connect to a server where MQ manager is installed. On the machine we use to try to connect to MQ we've installed MQ websphere (client), so we have to install something else ?? and if yes, what exactly ? because i am not clear with this !


If the machine on which you are running only has client installed, then your application must establish a client connection, not bind to the queue manager that isn't there. Because that won't work, as you've discovered.

You'll find the different ways of specifying connections in the Java manual, the ways of configuring a client in the Clients manual.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Feb 17, 2008 8:49 am Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Matrin wrote:
jefflowrey wrote:
You are trying to establish a bindings connection on a machine with only the client installed.


Hey Jeff,
well, we are trying to connect to a server where MQ manager is installed. On the machine we use to try to connect to MQ we've installed MQ websphere (client), so we have to install something else ?? and if yes, what exactly ? because i am not clear with this !

Thanks again for your help


Where did you install the client from? What version of the client did you install? Are you using JMS or Java base? In your code are you specifying the transport?

_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexGeneral IBM MQ SupportSending a msg to a queue using Java
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.