The CXF plugin works correctly when we use it from gradle bootRun.
But when we create a war file and deploy that to a standalone Tomcat, the deployment fails due to duplicate initialisation.
Our application uses Grails 3.1.10
Stacktrace:
09-Mar-2017 09:48:36.908 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/distalk]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:952)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1823)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.xml.ws.WebServiceException: java.lang.RuntimeException: Soap 1.1 endpoint already registered on address /lavasimulator
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:375)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:255)
at org.grails.cxf.utils.EndpointRegistrationUtil.publishEndpointUrl(EndpointRegistrationUtil.groovy:47)
at org.grails.cxf.utils.EndpointRegistrationUtil.wireEndpoints(EndpointRegistrationUtil.groovy:34)
at org.grails.cxf.utils.EndpointRegistrationUtil$wireEndpoints.call(Unknown Source)
at grails.cxf.CxfGrailsPlugin.doWithApplicationContext(CxfGrailsPlugin.groovy:73)
The CXF plugin works correctly when we use it from
gradle bootRun
.But when we create a war file and deploy that to a standalone Tomcat, the deployment fails due to duplicate initialisation.
Our application uses Grails 3.1.10
Stacktrace: