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 » NoClassDefRFoundError: javax/resource/spi/

Post new topic  Reply to topic
 NoClassDefRFoundError: javax/resource/spi/ « View previous topic :: View next topic » 
Author Message
ivanachukapawn
PostPosted: Thu Jan 23, 2014 7:17 am    Post subject: NoClassDefRFoundError: javax/resource/spi/ Reply with quote

Knight

Joined: 27 Oct 2003
Posts: 561

Developed and successfully tested a PCFAgent monitoring app using NetBeans and deployed the executable JAR for this app to another Windows server. When running this JAR I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/resource/spi/ConnectionRequestInfo. FYI the I get the same error on the Windows server where the app was developed. The app successfully runs from within the NetBeans IDE via the run project menu.


At a loss as to how to resolve this error: googling the web for info on javax/resource/spi I believe that the missing class is related to jca. In NetBeans, I build and test successfully with no import for javax and no classpath for jca JAR files.
The executable jar was built by NetBeans with the following information messages:
Created dir: C:\Users\j.b.davis\Documents\NetBeansProjects\ListChannelStatus\dist
Copying 1 file to C:\Users\j.b.davis\Documents\NetBeansProjects\ListChannelStatus\build
Not copying library C:\Program Files (x86)\IBM\WebSphere MQ\java\lib\jca , it's a directory.
Copy libraries to C:\Users\j.b.davis\Documents\NetBeansProjects\ListChannelStatus\dist\lib.
Building jar: C:\Users\j.b.davis\Documents\NetBeansProjects\ListChannelStatus\dist\ListChannelStatus.jar
To run this application from the command line without Ant, try:
java -jar "C:\Users\j.b.davis\Documents\NetBeansProjects\ListChannelStatus\dist\ListChannelStatus.jar"

NOTE: MQ\java\lib\jca was not copied to the lib directory because it is a directory - obviously where the problem lies. But the jca directory is empty in the MQ distribution: C:\Program Files (x86)\IBM\WebSphere MQ\java\lib -
Back to top
View user's profile Send private message
Chris_L
PostPosted: Fri Jan 24, 2014 2:38 am    Post subject: Reply with quote

Newbie

Joined: 22 Jan 2014
Posts: 5

Hello

The dependency in question should be resolved by connector.jar, which is included in the java/lib directory along with the com.ibm.mq* jar files.

I don't believe that this dependency is declared with the manifest, so you'll need to manually add connector.jar to the classpath.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » NoClassDefRFoundError: javax/resource/spi/
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.