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 » Another libmqjbnd05.so problem

Post new topic  Reply to topic Goto page 1, 2  Next
 Another libmqjbnd05.so problem « View previous topic :: View next topic » 
Author Message
Saugui
PostPosted: Mon Feb 14, 2005 10:34 pm    Post subject: Another libmqjbnd05.so problem Reply with quote

Novice

Joined: 03 Feb 2005
Posts: 23

Hi,

We need help as to why this is occurring when we try and runthis program in an AIX environment:

Connecting...
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/mqm/java/lib/libmqjbnd05.so: load ENOEXEC on shared library(s) /usr/mqm/java/lib/libmqjbnd05.so
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2120)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1998)
at java.lang.Runtime.loadLibrary0(Runtime.java:824)
at java.lang.System.loadLibrary(System.java:908)
at com.ibm.mq.MQSESSION.loadLib(MQSESSION.java:827)
at com.ibm.mq.server.MQSESSION$1.run(MQSESSION.java:221)
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java:287)
at com.ibm.mq.server.MQSESSION.<clinit>(MQSESSION.java:215)
at com.ibm.mq.MQSESSIONServer.getMQSESSION(MQSESSIONServer.java:67)
at com.ibm.mq.MQSESSION.getSession(MQSESSION.java:455)
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:155)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11._createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:153)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11.createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:189)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java:80)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java:171)
at com.ibm.mq.MQQueueManager.obtainBaseMQQueueManager(MQQueueManager.java:754)
at com.ibm.mq.MQQueueManager.construct(MQQueueManager.java:688)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:417)
at MQTest.main(MQTest.java:

CLASSPATH=:/usr/mqm/java/lib/com.ibm.mq.jar:/usr/mqm/java/lib/com.ibm.mqbind.jar:/usr/mqm/java/lib/connector.jar

LIBPATH=/usr/lpp/cmb/lib:/usr/java14_64/jre/lib:/usr/mqm/java/lib

libmqjbnd05.so is in /usr/mqm/java/lib:

ampcst01:miagent:/usr/mqm/java/lib>ls -l
total 7512
-r--r--r-- 1 mqm mqm 333052 May 28 2004 com.ibm.mq.jar
-r--r--r-- 1 mqm mqm 41748 May 28 2004 com.ibm.mqbind.jar
-r--r--r-- 1 mqm mqm 1762125 May 28 2004 com.ibm.mqjms.jar
-r--r--r-- 1 mqm mqm 17978 May 28 2004 connector.jar
-r--r--r-- 1 mqm mqm 22769 May 28 2004 fscontext.jar
drwxr-xr-x 2 mqm mqm 512 May 28 2004 jdbc
-r--r--r-- 1 mqm mqm 25998 May 28 2004 jms.jar
-r--r--r-- 1 mqm mqm 98496 May 28 2004 jndi.jar
-r--r--r-- 1 mqm mqm 8809 May 28 2004 jta.jar
-r--r--r-- 1 mqm mqm 123717 May 28 2004 ldap.jar
-r-xr-xr-x 1 mqm mqm 22862 May 28 2004 libMQXAi02.so
-r-xr-xr-x 1 mqm mqm 11741 May 28 2004 libmqjbdf02.so
-r-xr-xr-x 1 mqm mqm 114129 May 28 2004 libmqjbnd05.so
-r--r--r-- 1 mqm mqm 444365 May 28 2004 postcard.jar
-r--r--r-- 1 mqm mqm 77116 May 28 2004 providerutil.jar
-r--r--r-- 1 mqm mqm 702319 May 28 2004 rmm.jar

The version os AIX is 5.1 and MQSeries is 5.3 with CSD07.

The program is a very simple java program which just ries and connect to the local QMGR.

So... we have tried many ways of resolving this issue... but with no success.

Please advise.

Thanks.

Regards,
Nancy[/b]
Back to top
View user's profile Send private message
vennela
PostPosted: Tue Feb 15, 2005 7:39 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Nancy:

You have to set the environment variable on AIX
Code:
LD_LIBRARY_PATH=/usr/mqm/java/lib 



That will get rid of the error.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
fjb_saper
PostPosted: Tue Feb 15, 2005 2:02 pm    Post subject: Reply with quote

Grand High Poobah

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

I beg to differ.

The environment variable on AIX is LIBPATH
The environment variable on Solaris is LD_LIBRARY_PATH

try adding as well:
Code:
LIBPATH=$LIBPATH:/usr/mqm/java/lib/jdbc


Enjoy
Back to top
View user's profile Send private message Send e-mail
Saugui
PostPosted: Tue Feb 15, 2005 2:17 pm    Post subject: Reply with quote

Novice

Joined: 03 Feb 2005
Posts: 23

What do you mean the "AIX environment" as I also have LD_LIBRARY_PATH set to the following:

ampcst01:miagent:/home/miagent/bin>env LD_LIBRARY_PATH
/usr/mqm/java/lib

Please clarify.

Thanks.
Back to top
View user's profile Send private message
Saugui
PostPosted: Tue Feb 15, 2005 2:22 pm    Post subject: Reply with quote

Novice

Joined: 03 Feb 2005
Posts: 23

I also tried this and it didn't work:

ampcst01:miagent:/usr/mqm/java/lib>env LIBPATH
/usr/lpp/cmb/lib:/usr/java14_64/jre/lib:/usr/mqm/java/lib
ampcst01:miagent:/usr/mqm/java/lib>LIBPATH=$LIBPATH:/usr/mqm/java/lib/jdbc
ampcst01:miagent:/usr/mqm/java/lib>export LIBPATH
ampcst01:miagent:/usr/mqm/java/lib>env LIBPATH
/usr/lpp/cmb/lib:/usr/java14_64/jre/lib:/usr/mqm/java/lib:/usr/mqm/java/lib/jdbc

Still getting the same error.

Can you shed some more light on this matter?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Feb 15, 2005 2:23 pm    Post subject: Reply with quote

Grand High Poobah

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

I checked on my AIX machine.
LD_LIBRARY_PATH is not part of my environment in AIX but LIBPATH is.

LD_LIBRARY_PATH is part of my environment on the Sun Solaris machine.

Enjoy
Back to top
View user's profile Send private message Send e-mail
Saugui
PostPosted: Tue Feb 15, 2005 3:48 pm    Post subject: Reply with quote

Novice

Joined: 03 Feb 2005
Posts: 23

Anyone else have any suggestions?
Back to top
View user's profile Send private message
vennela
PostPosted: Tue Feb 15, 2005 6:19 pm    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Quote:
I checked on my AIX machine.
LD_LIBRARY_PATH is not part of my environment in AIX but LIBPATH is.

LD_LIBRARY_PATH is part of my environment on the Sun Solaris machine.


Thanks for the correction. LD_LIBRARY_PATH is for Solaris and Linux. LIBPATH is for AIX.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Saugui
PostPosted: Tue Feb 15, 2005 10:13 pm    Post subject: Reply with quote

Novice

Joined: 03 Feb 2005
Posts: 23

OK... I did more testing...

The default java runtime on the AIX machine is java 1.3. I re-compiled my mqtest class using java 1.3 and it worked!

Now, I need to know why it doesn't work with java 1.4? Because I did not want to install java 1.4 on this AIX machine just in case it causes other problems to exiting applications running on it, I just copied the java 1.4 directories onto the AIX machine and include in my PATH the java 1.4. Hence, my mqtest can run with java 1.4. Resulting in the Unsatisfiedlink error with the libmqjbnd05.so file.

Does this mean that I have to install java 1.4 to get my program working? OR do you have any other suggestions?
Back to top
View user's profile Send private message
cameron
PostPosted: Wed Feb 16, 2005 1:35 am    Post subject: Another libmqjbnd05.so problem Reply with quote

Newbie

Joined: 06 Feb 2005
Posts: 7
Location: Livingston, UK

You should not require to do anything else use the JDK1.4 JRE. I take it you are executing the hava command <full path to java executable>/java

The libraries being run by the JRE in this case cannot pick up the libmqjbnd05.so. This means the path being searched by the MQ libraries does not contain the executable. I had the same problem running on NT and had to add the path to the library to the PATH variable. I do not know what the PATH is on an AIX box, I hope this give you a pointer to the problem.

The other thing you could try to do is re-compile your classes in 1.4 when running the 1.4 JRE. This should not really make any difference no harm in trying.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Feb 16, 2005 12:03 pm    Post subject: Reply with quote

Grand High Poobah

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

This is really bizare. I compiled on NT in 1.4 being careful to use only 1.3 features(+ Lumberjack). Move the jar to AIX and it works fine.?
Are you sure you have everything you need in the CLASSPATH as well ?

Enjoy
Back to top
View user's profile Send private message Send e-mail
Saugui
PostPosted: Wed Feb 16, 2005 1:46 pm    Post subject: Reply with quote

Novice

Joined: 03 Feb 2005
Posts: 23

I think so...

Here's the mqtest.class code:

import com.ibm.mq.*;

public class MQTest {

public static void main(String[] args) {
try {
System.out.println("Connecting...");
MQQueueManager queueManager = new MQQueueManager(null);
System.out.println("Connected.");
queueManager.close();
System.out.println("Closed connection.");
} catch (MQException ex) {
System.out.println("MQ Exception caught: " + ex.getMessage());
System.err.println(ex.getStackTrace());
} catch (Exception e) {
System.out.println("Exception caught: " + e.getMessage());
System.err.println(e.getStackTrace());
}
}
}

And this is the shell script I use to run the class above:

#!/bin/sh
CLASSPATH=$CLASSPATH:/usr/mqm/java/lib/com.ibm.mq.jar:/usr/mqm/java/lib/com.ibm.
mqbind.jar:/usr/mqm/java/lib/connector.jar
LIBPATH=$LIBPATH:/usr/mqm/java/lib

echo $CLASSPATH
echo $LIBPATH

java -cp $CLASSPATH MQTest

Please note I want to run it with jre 1.4. I don't know if t's because I haven't actually installed it onto the server that it won't allow me to access the mq libraries. I only copied the 1.4 directories onto this server and added in my PATH to use the 1.4 java instead of the default 1.3 (which is actually installed on the server).

Thank You for any suggestions you can give me.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Feb 17, 2005 3:39 am    Post subject: Reply with quote

Grand High Poobah

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

I believe you need to have /usr/java1.4.x/bin in your PATH variable.
My guess is that during execution you are mixing up the java versions.

Make sure your path sequence gives you the right jvm first.

Enjoy
Back to top
View user's profile Send private message Send e-mail
Saugui
PostPosted: Thu Feb 17, 2005 2:50 pm    Post subject: Reply with quote

Novice

Joined: 03 Feb 2005
Posts: 23

Here's some more information:
ampcst01:miagent:/home/miagent/bin>which java
/home/miagent/java14_64/jre/bin/java

That is where I copied the jre 1.4 files. I have been using this. The result is still the same.

Any more suggestions?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Feb 17, 2005 9:14 pm    Post subject: Reply with quote

Grand High Poobah

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

Yes
64 bit jvm has a few "features" you might want to read up on as far as MQ is concerned. I believe you can only use a Client Connection and your server has to be a specific version....

Back to the books.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ Java / JMS » Another libmqjbnd05.so problem
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.