Question

I have written a web service that seems to be running fine - I can call it using the Netbeans interface. I have also written another application that can call it fine while running inside the Netbeans compiler (6.7.1). However when I deploy it on a hosted server under Tomcat - as soon as the web service is accessed the following error page gets thrown:

>Description: An unhandled exception occurred during the execution of the web application. >Please review the following stack trace for more information regarding the error.
>
>Exception Details: java.lang.NoClassDefFoundError
>  javax/xml/rpc/ServiceException
>
>Possible Source of Error:
>   Class Name: java.lang.Class
>   File Name: Class.java
>   Method Name: getDeclaredConstructors0
>   Line Number: -2
>
>Source not available. Information regarding the location of the exception can be     identified using the exception stack trace below.
>
>Stack Trace:
>
>java.lang.Class.getDeclaredConstructors0(Class.java:-2)
>java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
>java.lang.Class.getConstructor0(Class.java:2699)
>java.lang.Class.newInstance0(Class.java:326)
>java.lang.Class.newInstance(Class.java:308)
>java.beans.Beans.instantiate(Beans.java:204)
>java.beans.Beans.instantiate(Beans.java:48)
>com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:203)
  >com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:274)
>com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:78)
    >com.sun.rave.web.ui.appbase.faces.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:96)
>com.sun.rave.web.ui.appbase.FacesBean.getBean(FacesBean.java:231)
Was it helpful?

Solution

Exception Details: java.lang.NoClassDefFoundError javax/xml/rpc/ServiceException

That means you are missing the jar that provides javax.xml.rpc.ServiceException. Add that to your project and redeploy and it should go away.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top