camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paolo Antinori (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (CAMEL-10778) Error when component is defined as a blueprint bean node
Date Thu, 02 Feb 2017 14:38:51 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-10778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Paolo Antinori closed CAMEL-10778.
----------------------------------
    Resolution: Invalid

sorry, I made a mistake when testing this on 2.19.0.

It works with that version, or at least it doesn't fails consistently as it does on 2.17.1,
so I think we can close this.

> Error when component is defined as a blueprint bean node
> --------------------------------------------------------
>
>                 Key: CAMEL-10778
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10778
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-blueprint
>    Affects Versions: 2.18.1
>            Reporter: Paolo Antinori
>            Assignee: Grzegorz Grzybek
>
> Bug is still present with {{2.19.0-SNAPSHOT}}, tested on {{2017/02/02}}
> Probably a race condition.
> an xml containing this section:
> {code:xml}
>   <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&amp;matchOnUriPrefix=true"/-->
>             <from uri="jetty9:https://localhost:8091/invoke?matchOnUriPrefix=true"/>
>             <process ref="processor"/>
>         </route>
>     </camelContext>
> {code}
> generates this exception:
> {code}
> [         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
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message