Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
2.18.1
-
None
-
None
-
Unknown
Description
Bug is still present with 2.19.0-SNAPSHOT, tested on 2017/02/02
Probably a race condition.
an xml containing this section:
<bean id="jetty9" class="org.apache.camel.component.jetty9.JettyHttpComponent9"> <property name="sslContextParameters" ref="mySslContext" /> </bean> <camelContext trace="true" id="camel" xmlns="http://camel.apache.org/schema/blueprint"> <route> <!--from uri="jetty:https://localhost:8091/invoke?sslContextParametersRef=mySslContext&matchOnUriPrefix=true"/--> <from uri="jetty9:https://localhost:8091/invoke?matchOnUriPrefix=true"/> <process ref="processor"/> </route> </camelContext>
generates this exception:
[ Blueprint Extender: 1] ServerConnector INFO Started ServerConnector@178a115{ssl-http/1.1}{localhost:8091} [ Blueprint Extender: 1] Server INFO Started @13602ms [ Blueprint Extender: 1] BlueprintCamelContext INFO Route: route1 started and consuming from: Endpoint[jetty9:https://localhost:8091/invoke?matchOnUriPrefix=true] [ Blueprint Extender: 1] BlueprintCamelContext INFO Total 1 routes, of which 1 are started. [ Blueprint Extender: 1] BlueprintCamelContext INFO Apache Camel 2.17.0.redhat-630187 (CamelContext: camel) started in 0.915 seconds [ Blueprint Extender: 1] BlueprintCamelContext INFO Apache Camel 2.17.0.redhat-630187 (CamelContext: camel) is shutting down [ Blueprint Extender: 1] DefaultShutdownStrategy INFO Starting to graceful shutdown 1 routes (timeout 300 seconds) [amel) thread #0 - ShutdownTask] ServerConnector INFO Stopped ServerConnector@178a115{ssl-http/1.1}{localhost:8091} [amel) thread #0 - ShutdownTask] ContextHandler INFO Stopped o.e.j.s.ServletContextHandler@1f733f5e{/,null,UNAVAILABLE} [amel) thread #0 - ShutdownTask] DefaultShutdownStrategy INFO Route: route1 shutdown complete, was consuming from: Endpoint[jetty9:https://localhost:8091/invoke?matchOnUriPrefix=true] [ Blueprint Extender: 1] DefaultShutdownStrategy INFO Graceful shutdown of 1 routes completed in 0 seconds [ Blueprint Extender: 1] BlueprintCamelContext INFO Apache Camel 2.17.0.redhat-630187 (CamelContext: camel) uptime 0.982 seconds [ Blueprint Extender: 1] BlueprintCamelContext INFO Apache Camel 2.17.0.redhat-630187 (CamelContext: camel) is shutdown in 0.050 seconds [ Blueprint Extender: 1] BlueprintContainerImpl ERROR Unable to start blueprint container for bundle org.jboss.fuse.samples.camel-jetty-ssl-server-blueprint/3.0.0 org.apache.camel.RuntimeCamelException: Cannot auto create component: jetty9 at org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:410) at org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:386) at org.apache.camel.blueprint.handler.CamelNamespaceHandler$CamelDependenciesFinder.process(CamelNamespaceHandler.java:1048) at org.apache.aries.blueprint.container.BlueprintContainerImpl.processProcessors(BlueprintContainerImpl.java:529) at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:361) at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.apache.aries.blueprint.container.ExecutorServiceWrapper.run(ExecutorServiceWrapper.java:106) at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) 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: java.lang.IllegalArgumentException: Cannot add component as its already previously added: jetty9 at org.apache.camel.impl.DefaultCamelContext.addComponent(DefaultCamelContext.java:370) at org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:401) ... 16 more