|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
java.lang.NoClassDefFoundError: javax/resource/ResourceExcep |
« View previous topic :: View next topic » |
Author |
Message
|
eai_guy |
Posted: Wed Nov 14, 2007 10:20 pm Post subject: java.lang.NoClassDefFoundError: javax/resource/ResourceExcep |
|
|
Voyager
Joined: 18 Oct 2007 Posts: 90
|
Hi ,
I m trying to run a java application which connects to a queue manager and gets the current depth of a queue.
But I get the following exception when I try to run it,
java.lang.NoClassDefFoundError: javax/resource/ResourceException
I m using MQ 5.3 with CSD 12 and IBM J2RE 1.4.2 on linux platform
Below shell script is used to compile and run the application.
#!/bin/sh
INSTALL_PATH=/home/wbiadmin/Tools/MonitoringTool/
CLASSPATH=.
CLASSPATH=${CLASSPATH}:${INSTALL_PATH}lib/mail.jar
CLASSPATH=${CLASSPATH}:${INSTALL_PATH}lib/activation.jar
CLASSPATH=${CLASSPATH}:${INSTALL_PATH}lib/smtp.jar
CLASSPATH=${CLASSPATH}:${INSTALL_PATH}lib/classes12.jar
CLASSPATH=${CLASSPATH}:${INSTALL_PATH}lib/ojdbc.jar
CLASSPATH=${CLASSPATH}:${INSTALL_PATH}lib/com.ibm.mq.jar
CLASSPATH=${CLASSPATH}:${INSTALL_PATH}lib/com.ibm.mqjms.jar
CLASSPATH=${CLASSPATH}:${INSTALL_PATH}lib/com.ibm.mqbind.jar
CLASSPATH=${CLASSPATH}:${INSTALL_PATH}lib/connector.jar
echo CLASSPATH=$CLASSPATH
LD_LIBRARY_PATH=.
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${INSTALL_PATH}lib
echo LD_LIBRARY_PATH = $LD_LIBRARY_PATH
javac -classpath "${CLASSPATH}" Mail.java
javac -classpath "${CLASSPATH}" MonitorFlw.java
/home/wbiadmin/JRE1.4.2/j2re1.4.2_15/bin/java -classpath "${CLASSPATH}$" MonitorFlw monitortool.xml
All the jar file are copied in /home/wbiadmin/Tools/MonitoringTool/lib Directory.
Please share your thoughts ,suggestions . Let me know if my approach is wrong or something that I have missed out. |
|
Back to top |
|
 |
Gaya3 |
Posted: Wed Nov 14, 2007 11:29 pm Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
Hi
Please add, connector.jar ,jta.jar in the build path (connector.jar is there) (looks like the connector.jar might have corrupted or does not have all access privileges)
check the access privileges are there to do so
Following jar files has to be there on classpath
1. com.ibm.mq.jar
2. com.ibm.mqims.jar
3. connector.jar (important)
4. jms.jar
5. jndi.jar
6. jta.jar
7. providerutil.jar
8. fscontext.jar
9. ldap.jar
all these has to be there in the class path (connector and jta is very important in this case)
Regards
Gayathri _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
eai_guy |
Posted: Thu Nov 15, 2007 12:02 am Post subject: |
|
|
Voyager
Joined: 18 Oct 2007 Posts: 90
|
Gaya3 wrote: |
Please add, connector.jar ,jta.jar in the build path (connector.jar is there) (looks like the connector.jar might have corrupted or does not have all access privileges)
check the access privileges are there to do so
Following jar files has to be there on classpath
1. com.ibm.mq.jar
2. com.ibm.mqims.jar
3. connector.jar (important)
4. jms.jar
5. jndi.jar
6. jta.jar
7. providerutil.jar
8. fscontext.jar
9. ldap.jar
all these has to be there in the class path (connector and jta is very important in this case)
Regards
Gayathri |
Hi Gayathri,
I have added all the jar files to the classpath but Now I m getting a runtime Exception as below,
java.lang.UnsatisfiedLinkError : no mqjbnd05 in java.libray.path
As per some post on the forum , I have set LD_LIBRARY_PATH to the lib folder where I have kept all the jar files
Please let me know about this exception java.lang.UnsatisfiedLinkError : no mqjbnd05 in java.libray.path
suggestions are appreciated.
Regards, |
|
Back to top |
|
 |
Gaya3 |
Posted: Thu Nov 15, 2007 12:13 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
|
Back to top |
|
 |
eai_guy |
Posted: Thu Nov 15, 2007 1:28 am Post subject: Solved |
|
|
Voyager
Joined: 18 Oct 2007 Posts: 90
|
eai_guy wrote: |
Gaya3 wrote: |
Please add, connector.jar ,jta.jar in the build path (connector.jar is there) (looks like the connector.jar might have corrupted or does not have all access privileges)
check the access privileges are there to do so
Following jar files has to be there on classpath
1. com.ibm.mq.jar
2. com.ibm.mqims.jar
3. connector.jar (important)
4. jms.jar
5. jndi.jar
6. jta.jar
7. providerutil.jar
8. fscontext.jar
9. ldap.jar
all these has to be there in the class path (connector and jta is very important in this case)
Regards
Gayathri |
Hi Gayathri,
I have added all the jar files to the classpath but Now I m getting a runtime Exception as below,
java.lang.UnsatisfiedLinkError : no mqjbnd05 in java.libray.path
As per some post on the forum , I have set LD_LIBRARY_PATH to the lib folder where I have kept all the jar files
Please let me know about this exception java.lang.UnsatisfiedLinkError : no mqjbnd05 in java.libray.path
suggestions are appreciated.
Regards, |
Hi ,
Application is running successfully. Solution to this is while running pass the library path to the application I tried the folloeing and it worked,
/home/wbiadmin/JRE1.4.2/j2re1.4.2_15/bin/java -Djava.library.path=/opt/mqm/java/lib -classpath "${CLASSPATH}$" MonitorFlw monitortool.xml
monitor.xml is input file to my application.
Thanks |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Nov 15, 2007 9:13 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Don't know how you are getting the qdepth but I would have expected to see MS0B support pack jars in your classpath as well...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
eai_guy |
Posted: Mon Nov 19, 2007 10:37 pm Post subject: Re: Solved |
|
|
Voyager
Joined: 18 Oct 2007 Posts: 90
|
eai_guy wrote: |
eai_guy wrote: |
Gaya3 wrote: |
Please add, connector.jar ,jta.jar in the build path (connector.jar is there) (looks like the connector.jar might have corrupted or does not have all access privileges)
check the access privileges are there to do so
Following jar files has to be there on classpath
1. com.ibm.mq.jar
2. com.ibm.mqims.jar
3. connector.jar (important)
4. jms.jar
5. jndi.jar
6. jta.jar
7. providerutil.jar
8. fscontext.jar
9. ldap.jar
all these has to be there in the class path (connector and jta is very important in this case)
Regards
Gayathri |
Hi Gayathri,
I have added all the jar files to the classpath but Now I m getting a runtime Exception as below,
java.lang.UnsatisfiedLinkError : no mqjbnd05 in java.libray.path
As per some post on the forum , I have set LD_LIBRARY_PATH to the lib folder where I have kept all the jar files
Please let me know about this exception java.lang.UnsatisfiedLinkError : no mqjbnd05 in java.libray.path
suggestions are appreciated.
Regards, |
Hi ,
Application is running successfully. Solution to this is while running pass the library path to the application I tried the folloeing and it worked,
/home/wbiadmin/JRE1.4.2/j2re1.4.2_15/bin/java -Djava.library.path=/opt/mqm/java/lib -classpath "${CLASSPATH}$" MonitorFlw monitortool.xml
monitor.xml is input file to my application.
Thanks |
Hi Guys ,
No need to include all the above jar files if you are doing a simple operations like connecting to queue manager , Inquiring a queue for its currenthDepth, MaxDepth.
For above operations keep only connector.jar,com.ibm.mq.jar in your classpath.
Only key points to keep in mind is please initialise your MQEnvironment variable as follows
MQEnvironment.hostname = hostName;
MQEnvironment.channel = channel;
MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY,MQC.TRANSPORT_MQSERIES);
someone Correct me if I m wrong,
I have follwed the above procedure and it works fine for me...  |
|
Back to top |
|
 |
gm_naren2001 |
Posted: Sun May 24, 2009 3:58 am Post subject: |
|
|
Newbie
Joined: 27 Apr 2007 Posts: 6 Location: India
|
Pls. add connector.jar file to to your tool classpath. Problem resolved - Nagendra.
If you have any further doubts on this issue you can mail me to my mail id : tonagendrababu@rediffmail.com
Thanks,
Your Friend _________________ thank you |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|