-
Bug
-
Resolution: Done
-
Blocker
-
fuse-7.1
Whenever a Fuse EAP camel-cxf application is undeployed, it results in the following exception:
java.lang.IllegalStateException at org.jboss.msc.value.InjectedValue.getValue(InjectedValue.java:47) at org.wildfly.extension.camel.service.CamelEndpointDeployerService.undeploy(CamelEndpointDeployerService.java:401) at org.wildfly.extension.camel.service.CamelEndpointDeploymentSchedulerService.unschedule(CamelEndpointDeploymentSchedulerService.java:177) at org.apache.cxf.transport.undertow.wildfly.WildflyHTTPServerEngine.removeServant(WildflyHTTPServerEngine.java:73) at org.apache.cxf.transport.undertow.UndertowHTTPDestination.deactivate(UndertowHTTPDestination.java:158) at org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:65) at org.apache.cxf.endpoint.ServerImpl.stop(ServerImpl.java:174) at org.apache.camel.component.cxf.jaxrs.CxfRsConsumer.doStop(CxfRsConsumer.java:111) at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:102) at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:142) at org.apache.camel.impl.DefaultShutdownStrategy.shutdownNow(DefaultShutdownStrategy.java:381) at org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask.run(DefaultShutdownStrategy.java:577) 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:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
This means that the CXF endpoint deployment is not being fully undeployed. The HTTP endpoint is still active even when the parent WAR has been undeployed.
To see this in action, do the following:
1. Deploy wildfly-camel-examples quickstart camel-cxf-jaxrs
mvn install -Pdeploy
2. Confirm the CXF REST endpoint works
curl -v -L http://127.0.0.1:8080/rest/greet/hello/foo
3. Undeploy the quickstart and notice the IllegalStateException in the server logs
mvn clean -Pdeploy
4. Hit the REST endpoint again and see HTTP 500 response
curl -v -L http://127.0.0.1:8080/rest/greet/hello/foo
The fact that an HTTP 500 is returned and not 404 indicates that the CXF application is still active.