Wednesday, April 4, 2012

java.lang.NoClassDefFoundError: org/glassfish/ha/store/api/BackingStoreException


If you get below error, Please add ha-api.jar file in your classpath.

SEVERE: WSSERVLET11: failed to parse runtime descriptor: java.lang.NoClassDefFoundError: org/glassfish/ha/store/api/BackingStoreException
java.lang.NoClassDefFoundError: org/glassfish/ha/store/api/BackingStoreException
 at com.sun.xml.ws.transport.http.servlet.ServletAdapter.(ServletAdapter.java:95)
 at com.sun.xml.ws.transport.http.servlet.ServletAdapterList.createHttpAdapter(ServletAdapterList.java:77)
 at com.sun.xml.ws.transport.http.servlet.ServletAdapterList.createHttpAdapter(ServletAdapterList.java:53)
 at com.sun.xml.ws.transport.http.HttpAdapterList.createAdapter(HttpAdapterList.java:77)
 at com.sun.xml.ws.transport.http.HttpAdapterList.createAdapter(HttpAdapterList.java:71)
 at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:267)
 at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:153)
 at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate(WSServletContextListener.java:131)
 at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:152)
 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4681)




You may need to add ha-api.jar jar file in your lib folder of the server OR the project in which you are getting the above error.

You can download latest version of JAR file (E.g. JAXWS2.2.6-20120220.zip ) from http://jax-ws.java.net/
Extract the file in your local machine you will find this file jaxws-ri/lib/ha-api.jar. Add it to your class path and i hope you may get rid of the above error.