Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jaxws-rt 2.3.4 + Tomcat 9 gives WSSERVLET11: failed to parse runtime descriptor: java.lang.IllegalArgumentException: {0} is not instance of ServerPipeAssemblerContext #226

Closed
sephiroth-j opened this issue May 18, 2021 · 9 comments · Fixed by #238

Comments

@sephiroth-j
Copy link

We have a few simple SOAP-Services using jaxws-rt running in a Tomcat 9. jaxws-rt is bundled within the war file of the service so the Tomcat as no extra libs. After updating from jaxws-rt 2.3.3 to 2.3.4 the application fails to start with the error as seen below. Downgrading to jaxws-rt 2.3.3 and the error is gone.

Java version: 11.0.11
Tomcat version: 9.0.46
Deployment descriptors: sun-jaxws.xml, web.xml

Stacktrace of error

com.sun.xml.ws.transport.http.servlet.WSServletContextListener parseAdaptersAndCreateDelegate
SEVERE: WSSERVLET11: Laufzeitdeskriptor konnte nicht geparst werden: java.lang.IllegalArgumentException: {0} is not instance of ServerPipeAssemblerContext
java.lang.IllegalArgumentException: {0} is not instance of ServerPipeAssemblerContext
	at com.sun.xml.ws.api.pipe.TubelineAssemblerFactory$TubelineAssemblerAdapter.createServer(TubelineAssemblerFactory.java:119)
	at com.sun.xml.ws.server.WSEndpointImpl.<init>(WSEndpointImpl.java:163)
	at com.sun.xml.ws.server.EndpointFactory.create(EndpointFactory.java:307)
	at com.sun.xml.ws.server.EndpointFactory.create(EndpointFactory.java:302)
	at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:134)
	at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:578)
	at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:560)
	at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:273)
	at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:149)
	at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate(WSServletContextListener.java:101)
	at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:122)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4716)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5172)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:829)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.startup.Tomcat.start(Tomcat.java:486)
@lukasj
Copy link
Member

lukasj commented Jun 2, 2021

can you try 2.3.5-SNAPSHOT, and post the stacktrace again, please? It has improved error message, so one can see what gets passed to this method. Thanks!

@sephiroth-j
Copy link
Author

sephiroth-j commented Jun 2, 2021

@lukasj, an instance of com.sun.xml.ws.api.pipe.ServerTubeAssemblerContext gets passed. Here is the complete stacktrace with 2.3.5-SNAPSHOT.

02-Jun-2021 17:12:01.726 SEVERE [main] com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate WSSERVLET11: Laufzeitdeskriptor konnte nicht geparst werden: java.lang.IllegalArgumentException: com.sun.xml.ws.api.pipe.ServerTubeAssemblerContext@57859e2c is not instance of ServerPipeAssemblerContext
	java.lang.IllegalArgumentException: com.sun.xml.ws.api.pipe.ServerTubeAssemblerContext@57859e2c is not instance of ServerPipeAssemblerContext
		at com.sun.xml.ws.api.pipe.TubelineAssemblerFactory$TubelineAssemblerAdapter.createServer(TubelineAssemblerFactory.java:119)
		at com.sun.xml.ws.server.WSEndpointImpl.<init>(WSEndpointImpl.java:163)
		at com.sun.xml.ws.server.EndpointFactory.create(EndpointFactory.java:307)
		at com.sun.xml.ws.server.EndpointFactory.create(EndpointFactory.java:302)
		at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:134)
		at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:578)
		at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:560)
		at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:273)
		at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:149)
		at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate(WSServletContextListener.java:101)
		at com.sun.xml.ws.transport.http.servlet.WSServletContainerInitializer.onStartup(WSServletContainerInitializer.java:35)
		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
		at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
		at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:692)
		at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1023)
		at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1903)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
		at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:824)
		at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
		at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1611)
		at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:319)
		at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
		at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
		at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
		at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
		at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:829)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
		at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
		at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
		at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
		at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.base/java.lang.reflect.Method.invoke(Method.java:566)
		at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
		at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
02-Jun-2021 17:12:01.729 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Error during ServletContainerInitializer processing
	javax.servlet.ServletException: com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11: Laufzeitdeskriptor konnte nicht geparst werden: java.lang.IllegalArgumentException: com.sun.xml.ws.api.pipe.ServerTubeAssemblerContext@57859e2c is not instance of ServerPipeAssemblerContext
		at com.sun.xml.ws.transport.http.servlet.WSServletContainerInitializer.onStartup(WSServletContainerInitializer.java:40)
		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
		at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
		at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:692)
		at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1023)
		at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1903)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
		at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:824)
		at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
		at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1611)
		at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:319)
		at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
		at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
		at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
		at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
		at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:829)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
		at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
		at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
		at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
		at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.base/java.lang.reflect.Method.invoke(Method.java:566)
		at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
		at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
	Caused by: com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11: Laufzeitdeskriptor konnte nicht geparst werden: java.lang.IllegalArgumentException: com.sun.xml.ws.api.pipe.ServerTubeAssemblerContext@57859e2c is not instance of ServerPipeAssemblerContext
		at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate(WSServletContextListener.java:111)
		at com.sun.xml.ws.transport.http.servlet.WSServletContainerInitializer.onStartup(WSServletContainerInitializer.java:35)
		... 40 more
	Caused by: java.lang.IllegalArgumentException: com.sun.xml.ws.api.pipe.ServerTubeAssemblerContext@57859e2c is not instance of ServerPipeAssemblerContext
		at com.sun.xml.ws.api.pipe.TubelineAssemblerFactory$TubelineAssemblerAdapter.createServer(TubelineAssemblerFactory.java:119)
		at com.sun.xml.ws.server.WSEndpointImpl.<init>(WSEndpointImpl.java:163)
		at com.sun.xml.ws.server.EndpointFactory.create(EndpointFactory.java:307)
		at com.sun.xml.ws.server.EndpointFactory.create(EndpointFactory.java:302)
		at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:134)
		at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:578)
		at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:560)
		at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:273)
		at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:149)
		at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate(WSServletContextListener.java:101)
		... 41 more

@lukasj
Copy link
Member

lukasj commented Jun 2, 2021

hm, no luck. I would need either the service on which this fails together with the relevant piece of descriptor file OR more info about the environment (do you use any 3rd party jaxws-ri extension, like ie custom transport?) to be able to reproduce the problem

@sephiroth-j
Copy link
Author

Now that you have mentioned it. We have com.sun.xml.wss:xws-security:3.0 in the path. I created a minimal test project, but it did not initially include com.sun.xml.wss:xws-security:3.0 , so I could not recreate the error with it. The error only occurred after I added it as dependency. We will try to replace xws-security with org.glassfish.metro:wssx-impl.

test project: metro-jax-ws-issue-226.zip

@lukasj
Copy link
Member

lukasj commented Jun 3, 2021

you'll need org.glassfish.metro:wssx-impl:jar:2.4.5 (not 3+)

Thanks for the project, I'll take a look at it.

@lukasj
Copy link
Member

lukasj commented Jun 3, 2021

We will try to replace xws-security with org.glassfish.metro:wssx-impl.

let me know if this won't work. The cause here is usage of com.sun.xml.wss:xws-security:3.0 which is way too old (among other things) and evolved into wssx-impl

@sephiroth-j
Copy link
Author

Thanks, it worked. But we had to downgrade saaj-impl to 1.5.2 because xmlsec 2.1.6 and 2.2.2 have a problem with saaj-impl 1.5.3 when ws-security is used (SANTUARIO-570).

@lukasj lukasj linked a pull request Jun 3, 2021 that will close this issue
lukasj added a commit that referenced this issue Jun 3, 2021
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
@lukasj
Copy link
Member

lukasj commented Jun 3, 2021

should be fixed in 2.3.5-SNAPSHOT (your test passes on my end). Wrt the other issue related to saaj-impl - would it be possible to create an issue at https://github.com/eclipse-ee4j/metro-saaj/issues and attach failing sample there, please? There are probably more issues similar to what you see which I'm trying to fix for 1.5.4 (no ETA for that yet) and having more tests would really help.

@lukasj lukasj closed this as completed Jun 3, 2021
@sephiroth-j
Copy link
Author

Will do. I try to enhance the demo project from here with a ws-security SOAPHandler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants