Skip to main content

Can't get fromwsdl sample project working on tomcat: NoSuchMethodError: javax.xml.ws.WebFault.messageName

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
4 replies [Last post]
dgodbey
Offline
Joined: 2006-10-27
Points: 0

Folks:
Anyone know why I can't get the samples working under tomcat? I think I've done everything I'm supposed to do, but it still doesn't work.

1. jaxb-api.jar and jaxws-api.jar put into JAVA_HOME/jre/lib/endorsed/
2. Put all the jar files from the JAXWS_HOME/lib directory into CATALINA_HOME/lib/ext directory
3. Edit catalina.properties file, put ${catalina.home}/lib/ext/*.jar, at front of common.loader. Tried shared.loader too, same result.
4. ant -Dtomcat=y server to deploy to my tomcat
5. war never successfully installs. I always get java.lang.NoSuchMethodError: javax.xml.ws.WebFault.messageName()Ljava/lang/String. I think this error is coming from jre rt.jar, but I don't know why.

Versions:
Metro: 2.2.7
Java: 1.6.0_30
Tomcat: 6.0.35

What am I missing? Have the samples been updated for 2.2.7?

Thanks for your help,
Dave

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Glen Mazza

I think Metro 2.2.1 is the latest, not 2.2.7. But this tutorial might
be better for you anyway:
http://www.jroller.com/gmazza/entry/web_service_tutorial

Glen

On 08/30/2012 03:54 PM, forums@java.net wrote:
> Folks: Anyone know why I can't get the samples working under tomcat? I
> think
> I've done everything I'm supposed to do, but it still doesn't work. 1.
> jaxb-api.jar and jaxws-api.jar put into JAVA_HOME/jre/lib/endorsed/ 2.
> Put
> all the jar files from the JAXWS_HOME/lib directory into
> CATALINA_HOME/lib/ext directory 3. Edit catalina.properties file, put
> ${catalina.home}/lib/ext/*.jar, at front of common.loader. Tried
> shared.loader too, same result. 4. ant -Dtomcat=y server to deploy to my
> tomcat 5. war never successfully installs. I always get
> java.lang.NoSuchMethodError:
> javax.xml.ws.WebFault.messageName()Ljava/lang/String. I think this
> error is
> coming from jre rt.jar, but I don't know why. Versions: Metro: 2.2.7
> Java:
> 1.6.0_30 Tomcat: 6.0.35 What am I missing? Have the samples been
> updated for
> 2.2.7? Thanks for your help, Dave
>

jungicz
Offline
Joined: 2004-08-17
Points: 0

Tomcat does not read JAVA_HOME/jre/lib/endorsed/, it expects endorsed directory to be $CATALINA_HOME/endorsed instead. You can find more info about this at http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html#XML_Pars...

dgodbey
Offline
Joined: 2006-10-27
Points: 0

Thanks for that info, and it makes a difference. However, it still doesn't work. Now I get this error, which appears in the localhost..log file and not the catalina.out file upon loading of war file:

SEVERE: Error configuring application listener of class com.sun.xml.ws.transport.http.servlet.WSServletContextListener
java.lang.ClassNotFoundException: com.sun.xml.ws.transport.http.servlet.WSServletContextListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4149)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

dgodbey
Offline
Joined: 2006-10-27
Points: 0

Ok, nevermind. Got it worked out. What I did is go back to JAXWS_HOME, clean out extra jars in Tomcat, and run ant install and ant install-api.

Looks like I've got things under control.
Thanks