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 » [Solved] mqseries using java

Post new topic  Reply to topic
 [Solved] mqseries using java « View previous topic :: View next topic » 
Author Message
mq_pm
PostPosted: Wed Aug 27, 2003 12:21 pm    Post subject: [Solved] mqseries using java Reply with quote

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
View user's profile Send private message Send e-mail
vennela
PostPosted: Wed Aug 27, 2003 12:36 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
mq_pm
PostPosted: Wed Aug 27, 2003 1:08 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
vennela
PostPosted: Wed Aug 27, 2003 1:31 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
mq_pm
PostPosted: Thu Aug 28, 2003 5:50 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
vennela
PostPosted: Thu Aug 28, 2003 7:27 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
mq_pm
PostPosted: Thu Aug 28, 2003 9:57 am    Post subject: Reply with quote

Centurion

Joined: 27 Aug 2003
Posts: 132

Thanks.................it is working
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » [Solved] mqseries 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.