wildfly-extras / wildfly-camel

WildFly Camel Subsystem
Apache License 2.0
73 stars 58 forks source link

IllegalStateException when reloading WildFly from the CLI #1658

Closed jamesnetherton closed 6 years ago

jamesnetherton commented 7 years ago

It's possible to reload the container via the CLI. E.g jboss-cli.sh -c --command="reload". When a Camel application is deployed it results in an IllegalStateException. However, the camel context does end up being started ok, so I'm not sure how much of an issue this is.

The exception is repeated per number of times the reload command is run.

13:23:42,062 WARN  [org.apache.camel.util.EventHelper] (MSC service thread 1-7) Error notifying event Starting CamelContext: spring-jee. This exception will be ignored. : java.lang.IllegalStateException: Service target is no longer valid
    at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2399)
    at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:317)
    at org.wildfly.extension.camel.service.CamelContextBindingService.addService(CamelContextBindingService.java:65)
    at org.wildfly.extension.camel.CamelCoreSubsystemExtension.addCamelContext(CamelCoreSubsystemExtension.java:67)
    at org.wildfly.extension.camel.service.CamelContextRegistryService$CamelContextRegistryImpl$2.accept(CamelContextRegistryService.java:255)
    at org.wildfly.extension.camel.service.CamelContextRegistryService$CamelContextRegistryImpl$2.accept(CamelContextRegistryService.java:252)
    at java.util.ArrayList$Itr.forEachRemaining(ArrayList.java:891)
    at org.wildfly.extension.camel.parser.SubsystemState.processExtensions(SubsystemState.java:95)
    at org.wildfly.extension.camel.service.CamelContextRegistryService$CamelContextRegistryImpl.addCamelContext(CamelContextRegistryService.java:252)
    at org.wildfly.extension.camel.service.CamelContextRegistryService$CamelContextRegistryImpl$1.notify(CamelContextRegistryService.java:228)
    at org.apache.camel.util.EventHelper.doNotifyEvent(EventHelper.java:805)
    at org.apache.camel.util.EventHelper.notifyCamelContextStarting(EventHelper.java:70)
    at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3088)
    at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:183)
    at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2961)
    at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2957)
    at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2980)
    at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2957)
    at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
    at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2924)
    at org.wildfly.extension.camel.deployment.CamelContextActivationProcessor.deploy(CamelContextActivationProcessor.java:52)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
    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)
jamesnetherton commented 6 years ago

Fixed in https://github.com/wildfly-extras/wildfly-camel/commit/023b58187a79392c148cc1e04ab1e836c63516e7.

kasirao commented 5 years ago

Hi ,

I am facing an issue with JBOSS 7.2.1GA. My application was working fine with Jboss6 but in 7 I am getting SSL error as it was not able to open the JKS file. But few of the call executed fine with SSL and in between i am getting this issue. Please find the below error and help me to resolve this.

2019-09-26 17:00:06,146 INFO [com.proximus.dmpl.integration.dcs.DataCollectionClient] (pool-11-thread-13) Response of the AAM request has been done. Status is 200 2019-09-26 17:00:06,148 INFO [org.apache.camel.util.jsse.SSLContextParameters] (pool-11-thread-7) Available providers: SUN version 1.8. 2019-09-26 17:00:06,149 INFO [org.apache.camel.util.jsse.SSLContextParameters] (pool-11-thread-27) Available providers: SUN version 1.8. 2019-09-26 17:00:06,154 INFO [org.apache.camel.util.jsse.SSLContextParameters] (pool-11-thread-18) Available providers: SUN version 1.8. 2019-09-26 17:00:06,156 INFO [org.apache.camel.util.jsse.SSLContextParameters] (pool-11-thread-30) Available providers: SUN version 1.8. 2019-09-26 17:00:06,162 INFO [org.apache.camel.util.jsse.SSLContextParameters] (pool-11-thread-15) Available providers: SUN version 1.8. 2019-09-26 17:00:06,165 ERROR [org.apache.camel.component.cxf.jaxrs.CxfRsProducer] (pool-11-thread-9) Error invoking request: java.lang.RuntimeException: Setting SSL failed at org.apache.camel.component.cxf.common.AbstractSslEndpointConfigurer.tryToGetSSLSocketFactory(AbstractSslEndpointConfigurer.java:48) [camel-cxf-2.22.0.jar:2.22.0] at org.apache.camel.component.cxf.common.AbstractSslEndpointConfigurer.setupHttpConduit(AbstractSslEndpointConfigurer.java:39) [camel-cxf-2.22.0.jar:2.22.0] at org.apache.camel.component.cxf.jaxrs.SslCxfRsEndpointConfigurer.configureClient(SslCxfRsEndpointConfigurer.java:50) [camel-cxf-2.22.0.jar:2.22.0] at org.apache.camel.component.cxf.jaxrs.ChainedCxfRsEndpointConfigurer.configureClient(ChainedCxfRsEndpointConfigurer.java:54) [camel-cxf-2.22.0.jar:2.22.0] at org.apache.camel.component.cxf.jaxrs.ChainedCxfRsEndpointConfigurer.configureClient(ChainedCxfRsEndpointConfigurer.java:53) [camel-cxf-2.22.0.jar:2.22.0] at org.apache.camel.component.cxf.jaxrs.CxfRsProducer.invokeAsyncHttpClient(CxfRsProducer.java:139) [camel-cxf-2.22.0.jar:2.22.0] at org.apache.camel.component.cxf.jaxrs.CxfRsProducer.process(CxfRsProducer.java:116) [camel-cxf-2.22.0.jar:2.22.0] at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148) [camel-core-2.22.0.jar:2.22.0] at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:76) [camel-core-2.22.0.jar:2.22.0] at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548) [camel-core-2.22.0.jar:2.22.0] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [camel-core-2.22.0.jar:2.22.0] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [camel-core-2.22.0.jar:2.22.0] at org.apache.camel.component.direct.DirectBlockingProducer.process(DirectBlockingProducer.java:53) [camel-core-2.22.0.jar:2.22.0] at org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:186) [camel-core-2.22.0.jar:2.22.0] at org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:86) [camel-core-2.22.0.jar:2.22.0] at org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:541) [camel-core-2.22.0.jar:2.22.0] at org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:506) [camel-core-2.22.0.jar:2.22.0] at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:369) [camel-core-2.22.0.jar:2.22.0] at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:506) [camel-core-2.22.0.jar:2.22.0] at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:229) [camel-core-2.22.0.jar:2.22.0] at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:144) [camel-core-2.22.0.jar:2.22.0] at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:130) [camel-core-2.22.0.jar:2.22.0] at com.proximus.dmpl.integration.dcs.DataCollectionClient.post(DataCollectionClient.java:78) [integration-3.6.0.jar:3.6.0] at com.proximus.dmpl.integration.camel.service.CamelIntegrationService.camelRequestProcessor(CamelIntegrationService.java:54) [integration-3.6.0.jar:3.6.0] at com.proximus.dmpl.bl.UpdateOfferDataProcessor.process(UpdateOfferDataProcessor.java:155) [classes:] at com.proximus.dmpl.bl.DataWarehouseDataProcessor.run(DataWarehouseDataProcessor.java:68) [classes:] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_222] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_222] at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_222] Caused by: java.io.IOException: Could not open dmpl-cots-itt.jks as a file, class path resource, or URL. at org.apache.camel.util.jsse.JsseParameters.resolveResource(JsseParameters.java:188) [camel-core-2.22

Regards, Kaasi