Author |
Message
|
mq_pm |
Posted: Wed Aug 27, 2003 12:21 pm Post subject: [Solved] mqseries using java |
|
|
Centurion
Joined: 27 Aug 2003 Posts: 132
|
hi,
I am new to mqseries. I am trying to run a sample program mqseries using java. I got an error like this......
Exception in thread "main" java.lang.NoClassDefFoundError: javax/resource/ResourceException
at Mqsample.<init>(Mqsample.java:11)
at Mqsample.main(Mqsample.java:50)
Anyone can tell me what could be the reason???
Thanks |
|
Back to top |
|
 |
vennela |
Posted: Wed Aug 27, 2003 12:36 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
You have a CLASSPATH problem.
You should set your CLASSPATH. Include the necessary jar files.
The class that is missing is in the connector.jar file (This jar should be in the same directory as mq.jar, mqjms.jar etc) |
|
Back to top |
|
 |
mq_pm |
Posted: Wed Aug 27, 2003 1:08 pm Post subject: |
|
|
Centurion
Joined: 27 Aug 2003 Posts: 132
|
I have already included it. But still i have the same problem.
Could you please tell me what could be the reason????? |
|
Back to top |
|
 |
vennela |
Posted: Wed Aug 27, 2003 1:31 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Then check if the jar file is really present in the directory you specified.
echo your classpath and see what it says. Maybe post it here |
|
Back to top |
|
 |
mq_pm |
Posted: Thu Aug 28, 2003 5:50 am Post subject: |
|
|
Centurion
Joined: 27 Aug 2003 Posts: 132
|
I have included all the files necessary in the CLASSPATH. I have checked all these are there in the directory.
I have set the classpath like this.......
CLASSPATH=C:\samplepgms\;C:\ma88_win\program files\IBM\MQSeries\Java\lib\com.ibm.mq.jar; C:\ma88_win\program files\IBM\MQSeries\Java\lib\connector.jar;C:\ma88_win\program files\IBM\MQSeries\Java\lib\;C:\ma88_win\program files\IBM\
MQSeries\Java\samples\base\;C:\ma88_win\program files\IBM\MQSeries\Java\lib\fscontext.jar;C:\ma88_win\program files\IBM\MQSeries\Java\lib\providerutil.jar;
Please let me know if there is any mistake???? Still I have the same problem........... |
|
Back to top |
|
 |
vennela |
Posted: Thu Aug 28, 2003 7:27 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Quote: |
C:\samplepgms\;C:\ma88_win\program files\IBM\MQSeries\Java\lib\com.ibm.mq.jar; C:\ma88_win\program files\IBM\MQSeries\Java\lib\connector.jar; |
There is a space in between the two jars you are specifying (after the semi colon and C: ) . I think that is the reason for the problem. I recreated the problem by inserting a space in between and I got exactly the same error.
Get rid of the space and try it again.
-------
Venny |
|
Back to top |
|
 |
mq_pm |
Posted: Thu Aug 28, 2003 9:57 am Post subject: |
|
|
Centurion
Joined: 27 Aug 2003 Posts: 132
|
Thanks.................it is working  |
|
Back to top |
|
 |
|