Forums Register Login

java.lang.NoClassDefFoundError: com.ibm.ws.naming.util.CommonHelpers

+Pie Number of slices to send: Send
Hi, I am new to JMS and Websphere server and I am trying to access a JMS queue configured on Websphere Application Server 8 from my Java code. But I am getting the exception mentioned below:
Start.....
*******null********
Exception in thread "main" java.lang.NoClassDefFoundError: com.ibm.ws.naming.util.CommonHelpers
at com.ibm.websphere.naming.WsnInitialContextFactory.getInitialContext(Unknown Source)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:230)
at javax.naming.InitialContext.initializeDefaultInitCtx(InitialContext.java:313)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:343)
at javax.naming.InitialContext.internalInit(InitialContext.java:281)
at javax.naming.InitialContext.<init>(InitialContext.java:206)
at com.jms.test.Demo.main(Demo.java:22)
Caused by: java.lang.ClassNotFoundException: com.ibm.ws.naming.util.CommonHelpers
at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
at java.lang.ClassLoader.loadClass(ClassLoader.java:646)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
at java.lang.ClassLoader.loadClass(ClassLoader.java:612)
... 7 more

PFB the complete code:


I have also added required jars: com.ibm.ws.messagingClient.jar
com.ibm.ws.sib.client_ExpeditorDRE_8.0.0.jar
com.ibm.ws.sib.client.thin.jms_8.0.0.jar
com.ibm.xml.thinclient_8.0.0.jar

I have made JMS configurations in the Websphere Application Server using the steps given at the link below: http://pic.dhe.ibm.com/infocenter/iisinfsv/v8r1/index.jsp?topic=/com.ibm.swg.im.iis.infoservdir.user.doc/topics/t_isd_user_setting_up_jms_in_was.html

Can someone please help me with this?
+Pie Number of slices to send: Send
Error you posted states clearly you are missing some library. Try and include all client jars, not only the ones you mentioned, and rerun your program.
What's a year in metric? Do you know this metric stuff tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2354 times.
Similar Threads
RAD 8.5 unable to run standalone java app that calls EJB and MQ
JNDI InitialContext Lookup Exception
Error while getting Datasource object
Problem in getting Intial context in Websphere 5.0.1
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 07:15:07.