- This topic has 2 replies, 3 voices, and was last updated 12 years, 9 months ago by support-tony.
-
AuthorPosts
-
jmrobichaudMemberI am using MyEclipse 8.6 on Windows 7 64-bit OS.
I have recently started using JAXWS to create a web service in my web application which I run and debug in the integrated/sandbox Tomcat server.
I provide the JAXWS JARs (version 2.1.7) in my WEB-INF/lib folder as recommended.
However, sandbox Tomcat seems to insist on loading XFire JARs before my own JARs and this results in a ClassCastException when launching the WSServletContextListener.
I believe the problem is in the .metadata\.me_tcat\conf\catalina.properties file which is being told:
shared.loader=${catalina.home}/../../com.genuitec.eclipse.ws.xfire_8.6.1.me201011040812/lib/*.jarRemoving this entry or emptying its value only results in it being automatically re-added the next time I launch Tomcat.
The only thing that appears to fix the problem is if I delete all JAR files from the specified MyEclipse XFire lib folder.
There are many other developers in my department that work on this code and I can’t ask them all to mutilate their MyEclipse installation so that we can implement a web service.
Is there another solution that I might be missing?
Does it make sense to automatically include JAR files for XFire for all web applications whether or not the developer wants to use them? And especially if they can’t override them?
Thanks in advance.
Full error message:
Feb 17, 2012 12:23:55 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized
INFO: WSSERVLET12: JAX-WS context listener initializing
Feb 17, 2012 12:23:56 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized
SEVERE: WSSERVLET11: failed to parse runtime descriptor: exception during WSDL parsing: jndi:/localhost/ewospatial/WEB-INF/wsdl/ByersRemoteFileSystemWSService.wsdl
com.sun.xml.ws.server.ServerRtException: exception during WSDL parsing: jndi:/localhost/ewospatial/WEB-INF/wsdl/ByersRemoteFileSystemWSService.wsdl
at com.sun.xml.ws.server.EndpointFactory.getWSDLPort(EndpointFactory.java:535)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:175)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:253)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:147)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:108)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
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:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: com.sun.xml.ws.util.ServiceConfigurationError: com.sun.xml.ws.api.wsdl.parser.WSDLParserExtension: Provider com.sun.xml.ws.policy.jaxws.PolicyWSDLParserExtension is specified in jar:file:/C:/Users/jrobichaud/AppData/Local/MyEclipse/Common/plugins/com.genuitec.eclipse.ws.xfire_8.6.1.me201011040812/lib/webservices-rt.jar!/META-INF/services/com.sun.xml.ws.api.wsdl.parser.WSDLParserExtensionbut could not be instantiated: java.lang.ClassCastException
at com.sun.xml.ws.util.ServiceFinder.fail(ServiceFinder.java:233)
at com.sun.xml.ws.util.ServiceFinder.access$300(ServiceFinder.java:141)
at com.sun.xml.ws.util.ServiceFinder$LazyIterator.next(ServiceFinder.java:379)
at com.sun.xml.ws.util.ServiceFinder.toArray(ServiceFinder.java:225)
at com.sun.xml.ws.server.EndpointFactory.getWSDLPort(EndpointFactory.java:513)
… 29 more
Caused by: java.lang.ClassCastException
at java.lang.Class.cast(Class.java:2990)
at com.sun.xml.ws.util.ServiceFinder$LazyIterator.next(ServiceFinder.java:374)
… 31 more
Feb 17, 2012 12:23:56 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class com.sun.xml.ws.transport.http.servlet.WSServletContextListener
com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11: failed to parse runtime descriptor: exception during WSDL parsing: jndi:/localhost/ewospatial/WEB-INF/wsdl/ByersRemoteFileSystemWSService.wsdl
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:118)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
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:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: com.sun.xml.ws.server.ServerRtException: exception during WSDL parsing: jndi:/localhost/ewospatial/WEB-INF/wsdl/ByersRemoteFileSystemWSService.wsdl
at com.sun.xml.ws.server.EndpointFactory.getWSDLPort(EndpointFactory.java:535)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:175)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:253)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:147)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:108)
… 24 more
Caused by: com.sun.xml.ws.util.ServiceConfigurationError: com.sun.xml.ws.api.wsdl.parser.WSDLParserExtension: Provider com.sun.xml.ws.policy.jaxws.PolicyWSDLParserExtension is specified in jar:file:/C:/Users/jrobichaud/AppData/Local/MyEclipse/Common/plugins/com.genuitec.eclipse.ws.xfire_8.6.1.me201011040812/lib/webservices-rt.jar!/META-INF/services/com.sun.xml.ws.api.wsdl.parser.WSDLParserExtensionbut could not be instantiated: java.lang.ClassCastException
at com.sun.xml.ws.util.ServiceFinder.fail(ServiceFinder.java:233)
at com.sun.xml.ws.util.ServiceFinder.access$300(ServiceFinder.java:141)
at com.sun.xml.ws.util.ServiceFinder$LazyIterator.next(ServiceFinder.java:379)
at com.sun.xml.ws.util.ServiceFinder.toArray(ServiceFinder.java:225)
at com.sun.xml.ws.server.EndpointFactory.getWSDLPort(EndpointFactory.java:513)
… 29 more
Caused by: java.lang.ClassCastException
at java.lang.Class.cast(Class.java:2990)
at com.sun.xml.ws.util.ServiceFinder$LazyIterator.next(ServiceFinder.java:374)
… 31 more
Feb 17, 2012 12:23:56 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Feb 17, 2012 12:23:56 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/ewospatial] startup failed due to previous errors
support-swapnaModeratorjmrobichaud ,
Sorry that you are seeing this issue. I have escalated it to a dev team member. They will get back to you.
support-tonyKeymasterjmrobichaud,
I couldn’t replicate your problem. If the application includes jars in its lib folder, they should always be picked up first, when running application code. I had thought that you might have another web service application deployed which didn’t have a JAX-WS jar file in the lib folder and so Tomcat loaded the one we supply, via the shared.loader property. However, I couldn’t replicate that situation though it may be worthwhile checking this.
Of course, you can always test on an externally installed Tomcat installation (which can be configured and launched from MyEclipse), if necessary but I can’t see that it should be necessary.
So please check that there are no other deployed applications that might be causing the problem you see. If there aren’t then can you try to create a minimal project that exhibits this behavior and send it to us, so we can try to replicate here?
-
AuthorPosts