Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NoClassDefFoundError when doing Queue CF lookup

 
Vijay Chandran
Ranch Hand
Posts: 186
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear friends,

I developed a standalone Java program to lookup queues and QCFs. I have created the Queues and QCFs in the IBM Websphere 6.1 with the Websphere MQ Messaging as the JMS provider.

This is the code i wrote:


When i executed the code, this is what i got:

C:\MQTest>java MQTest
Inside Main
Creating Initial context
Initial context cretaed successfully
Looking up Queue Connection Factory
Exception in thread "P=268743 =0:CT" java.lang.NoClassDefFoundError: org.eclipse.hyades.collection.correlation.ICorrelatorData
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:59)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1263)
at com.ibm.rmi.pi.InterceptorManager.runPreInit(InterceptorManager.java:
171)
at com.ibm.rmi.corba.ORB.initializeInterceptors(ORB.java:601)
at com.ibm.CORBA.iiop.ORB.initializeInterceptors(ORB.java:1054)
at com.ibm.rmi.corba.ORB.orbParameters(ORB.java:1315)
at com.ibm.rmi.corba.ORB.set_parameters(ORB.java:1206)
at com.ibm.CORBA.iiop.ORB.set_parameters(ORB.java:1662)
at org.omg.CORBA.ORB.init(ORB.java:364)
at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:86)
at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:179)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:83)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:59)
at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:102)
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:309)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(Ws
nInitCtxFactory.java:392)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:117)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:71
2)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:171)
at javax.naming.InitialContext.lookup(InitialContext.java:363)
at MQTest.main(MQTest.java:46)

These are the jars i included in the classpath:

C:\Program Files\IBM\WebSphere\AppServer\plugins\com.ibm.ws.runtime_6.1.0.jar;
C:\Program Files\IBM\WebSphere\AppServer\lib\WMQ\java\lib\com.ibm.mqjms.jar;
C:\MQTest\JarFiles\namingclient.jar;
C:\MQTest\JarFiles\naming.jar;
C:\MQTest\JarFiles\connector.jar;
C:\MQTest\JarFiles\com.ibm.mq.jar;
C:\Program Files\IBM\WebSphere\AppServer\runtimes\com.ibm.ws.admin.client_6.1.0.jar
C:\Program Files\IBM\WebSphere MQ\Java\lib\providerutil.jar;
C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ibm.mqjms.jar;
C:\Program Files\IBM\WebSphere MQ\Java\lib\ldap.jar;
C:\Program Files\IBM\WebSphere MQ\Java\lib\jta.jar;
C:\Program Files\IBM\WebSphere MQ\Java\lib\jndi.jar;
C:\Program Files\IBM\WebSphere MQ\Java\lib\jms.jar;
C:\Program Files\IBM\WebSphere MQ\Java\lib\connector.jar;
C:\Program Files\IBM\WebSphere MQ\Java\lib\fscontext.jar;
C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ibm.mq.jar;

Kindly provide your help.

Thanks & Regards
Vijay
[ October 13, 2008: Message edited by: vijaychandran ]
 
Vijay Chandran
Ranch Hand
Posts: 186
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear friends,

The above problem got solved by adding some jar files. Now, when i try to run the above program, the following error is displayed:

Inside Main
C:\Program Files\IBM\WebSphere\AppServer\java\jre\bin;.;C:\Program Files\IBM\WebSphere\AppServer\java\jre\bin;C:\Program Files\IBM\WebSphere\AppServer\java\jre\bin;C:\Program Files\IBM\WebSphere MQ\Java\lib;C:\Program Files\HP\NCU;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\IBM\WebSphere MQ\bin;C:\Program Files\IBM\WebSphere MQ\tools\c\samples\bin;C:\Program Files\IBM\WebSphere\AppServer\java\bin
Creating Initial context
Initial context cretaed successfully
Looking up Queue Connection Factory
Lookup object: class com.ibm.mq.jms.MQXAQueueConnectionFactory
Queue Connection Factory Lookup successful
Looking up Queue
Queue Lookup successful
Creating Queue Connection



Exception in thread "P=256369 =0:CT" java.lang.UnsatisfiedLinkError: mqjbnd05 (Not found in java.library.path)
at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:953)
at java.lang.ClassLoader.loadLibraryWithClassLoader(ClassLoader.java:922)
at java.lang.System.loadLibrary(System.java:451)
at com.ibm.mq.MQSESSION.loadLib(MQSESSION.java:872)
at com.ibm.mq.server.MQSESSION$1.run(MQSESSION.java:228)
at java.security.AccessController.doPrivileged(AccessController.java:192)
at com.ibm.mq.server.MQSESSION.<clinit>(MQSESSION.java:222)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
at com.ibm.mq.MQSESSIONServer.getMQSESSION(MQSESSIONServer.java:70)
at com.ibm.mq.MQSESSION.getSession(MQSESSION.java:492)
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:168)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11._createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:179)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11.createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:215)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java:84)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java:168)
at com.ibm.mq.MQQueueManagerFactory.obtainBaseMQQueueManager(MQQueueManagerFactory.java:772)
at com.ibm.mq.MQQueueManagerFactory.procure(MQQueueManagerFactory.java:697)
at com.ibm.mq.MQQueueManagerFactory.constructQueueManager(MQQueueManagerFactory.java:657)
at com.ibm.mq.MQQueueManagerFactory.createQueueManager(MQQueueManagerFactory.java:153)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:526)
at com.ibm.mq.MQSPIQueueManager.<init>(MQSPIQueueManager.java:69)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2007)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1496)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:150)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:60)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:171)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:112)
at com.test.mq.MQTest.main(MQTest.java:57)

What Jar file or class file i missed. Kindly provide your help.

Following are the system configurations:

Websphere 6.1
Websphere MQ 6.0
OS: Windows Server 2003
Using IBM Java

Regards,
Vijay
[ October 13, 2008: Message edited by: vijaychandran ]
 
Marimuthu Madasamy
Ranch Hand
Posts: 72
Java Monad Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This article might be useful for you,

http://www-01.ibm.com/support/docview.wss?uid=swg21248900
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"vijaychandran", please check your private messages.
 
Riaz Mogal
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please tell me how did you solved the below error. Not sure which JAR has the class.

java.lang.NoClassDefFoundError: org.eclipse.hyades.collection.correlation.ICorrelatorData
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:66)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:127)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1300)
at com.ibm.rmi.pi.InterceptorManager.runPreInit(InterceptorManager.java:171)



Here are some of the Jars which I added in classpath.

export WAS61_HOME=/opt/IBM/WebSphere/AppServer61
export WAS61_JARS=$WAS61_HOME/runtimes/com.ibm.ws.admin.client_6.1.0.jar:$WAS61_HOME/runtimes/com.ibm.ws.webservices.thinclient_6.1.0.jar:$WAS61_HOME/plugins/com.ibm.ws.runtime_6.1.0.jar
export WAS61_MQ_JARS=$WAS61_HOME/lib/WMQ/java/lib/com.ibm.mq.jar:$WAS61_HOME/lib/WMQ/java/lib/com.ibm.mqjms.jar:$WAS61_HOME/lib/WMQ/java/lib/dhbcore.jar
 
Asokan Sandeep
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found the class in org.eclipse.hyades.execution.correlation_4.1.301.v200802051751.jar in the SDPShared/plugins directory under the RAD install directory.
 
Shane Lee
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check out this article:
http://www-01.ibm.com/support/docview.wss?uid=swg21248900

it is due to the fact your jms provider, websphere MQ is using the transport mode bindings, so you have to set your websphere mq lib in your PATH environment variable.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic