• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

Myra Fires
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
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

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?
Claude Moore
Ranch Hand
Posts: 862
IBM DB2 Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!