[
https://issues.apache.org/jira/browse/CAMEL-18094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17556470#comment-17556470
]
Miroslav Borský edited comment on CAMEL-18094 at 6/20/22 5:21 PM:
------------------------------------------------------------------
Hi [~davsclaus]
I apologize for that, it was a copy paste error. I have included the depends-on
attribute and it worked for consumer, but it still fails for cxfEndpoint used
as producer.
karaf 4.4 and Java 11:
feature:repo-add camel 3.17.0
feature:install camel
feature:install camel-cxf
{code:xml}
<?xml version="1.0" encoding="utf-8"?>
<osgi:blueprint xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:camel="http://camel.apache.org/schema/blueprint"
xmlns:osgi="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:cxf="http://camel.apache.org/schema/blueprint/cxf">
<camel:camelContext id="VerySimple-context">
<camel:route id="VerySimple-route">
<camel:from uri="VerySimple"/>
<camel:to uri="VerySimple"/>
</camel:route>
</camel:camelContext>
<cxf:cxfEndpoint depends-on="VerySimple-context" id="VerySimple"
address="http://localhost:8088/VerySimple" serviceName="tns:VerySimple"
endpointName="tns:VerySimplePort" wsdlURL="file:deploy/VerySimple.wsdl"
xmlns:tns="http://www.talend.org/service/">
<cxf:properties>
<osgi:entry key="dataFormat" value="PAYLOAD"/>
</cxf:properties>
</cxf:cxfEndpoint>
</osgi:blueprint>
{code}
Error message:
{noformat}
Error occurred during starting CamelContext: VerySimple-context
org.apache.camel.FailedToCreateRouteException: Failed to create route
VerySimple-route at: >>> To[VerySimple] <<< in route:
Route(VerySimple-route)[From[VerySimple] -> [To[VerySimple]]... because of
camelContext must be specified
at
org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:240)
~[!/:3.17.0]
at
org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:74)
~[!/:3.17.0]
at
org.apache.camel.impl.DefaultModelReifierFactory.createRoute(DefaultModelReifierFactory.java:49)
~[!/:3.17.0]
at
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:862)
~[!/:3.17.0]
at
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:750)
~[!/:3.17.0]
at
org.apache.camel.impl.engine.AbstractCamelContext.doInit(AbstractCamelContext.java:2946)
~[!/:3.17.0]
at
org.apache.camel.support.service.BaseService.init(BaseService.java:83)
~[!/:3.17.0]
at
org.apache.camel.impl.engine.AbstractCamelContext.init(AbstractCamelContext.java:2629)
~[!/:3.17.0]
at
org.apache.camel.support.service.BaseService.start(BaseService.java:111)
~[!/:3.17.0]
at
org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2648)
~[!/:3.17.0]
at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:262)
~[!/:3.17.0]
at
org.apache.camel.blueprint.BlueprintCamelContext.start(BlueprintCamelContext.java:241)
~[!/:3.17.0]
at
org.apache.camel.blueprint.BlueprintCamelContext.maybeStart(BlueprintCamelContext.java:283)
~[!/:3.17.0]
at
org.apache.camel.blueprint.BlueprintCamelContext.blueprintEvent(BlueprintCamelContext.java:188)
[!/:3.17.0]
at
org.apache.aries.blueprint.container.BlueprintEventDispatcher$3.call(BlueprintEventDispatcher.java:197)
[!/:1.10.3]
at
org.apache.aries.blueprint.container.BlueprintEventDispatcher$3.call(BlueprintEventDispatcher.java:195)
[!/:1.10.3]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
[?:?]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[?:?]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: java.lang.IllegalArgumentException: camelContext must be specified
at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:155)
~[!/:3.17.0]
at
org.apache.camel.processor.SendProcessor.<init>(SendProcessor.java:73)
~[!/:3.17.0]
at
org.apache.camel.reifier.SendReifier.createProcessor(SendReifier.java:38)
~[!/:3.17.0]
at
org.apache.camel.reifier.ProcessorReifier.makeProcessor(ProcessorReifier.java:847)
~[!/:3.17.0]
at
org.apache.camel.reifier.ProcessorReifier.addRoutes(ProcessorReifier.java:588)
~[!/:3.17.0]
at
org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:236)
~[!/:3.17.0]
... 24 more
{noformat}
was (Author: JIRAUSER279946):
Hi [~davsclaus]
I apologize for that, it was a copy paste error. I have included the depends-on
attribute and it worked for consumer, but it still fails with the same error
message for cxfEndpoint used as producer.
karaf 4.4 and Java 11:
feature:repo-add camel 3.17.0
feature:install camel
feature:install camel-cxf
{code:xml}
<?xml version="1.0" encoding="utf-8"?>
<osgi:blueprint xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:camel="http://camel.apache.org/schema/blueprint"
xmlns:osgi="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:cxf="http://camel.apache.org/schema/blueprint/cxf">
<camel:camelContext id="VerySimple-context">
<camel:route id="VerySimple-route">
<camel:from uri="VerySimple"/>
<camel:to uri="VerySimple"/>
</camel:route>
</camel:camelContext>
<cxf:cxfEndpoint depends-on="VerySimple-context" id="VerySimple"
address="http://localhost:8088/VerySimple" serviceName="tns:VerySimple"
endpointName="tns:VerySimplePort" wsdlURL="file:deploy/VerySimple.wsdl"
xmlns:tns="http://www.talend.org/service/">
<cxf:properties>
<osgi:entry key="dataFormat" value="PAYLOAD"/>
</cxf:properties>
</cxf:cxfEndpoint>
</osgi:blueprint>
{code}
> camel-karaf - exception when initiating no-java cxf endpoint with blueprint:
> camelContext must be specified
> -----------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-18094
> URL: https://issues.apache.org/jira/browse/CAMEL-18094
> Project: Camel
> Issue Type: Bug
> Components: camel-cxf, camel-karaf
> Affects Versions: 3.16.0
> Environment: karaf 4.4
> Java 11
> camel 3.16.0
> Reporter: Miroslav Borský
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 3.14.4, 3.17.0
>
> Attachments: VerySimple.wsdl, VerySimple.xml
>
>
> karaf 4.4 and Java 11:
> feature:repo-add camel 3.16.0
> feature:install camel
> feature:install camel-cxf
> then created the following blueprint:
> {code:xml}
> <?xml version="1.0" encoding="utf-8"?>
> <osgi:blueprint xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:camel="http://camel.apache.org/schema/blueprint"
> xmlns:osgi="http://www.osgi.org/xmlns/blueprint/v1.0.0"
> xmlns:cxf="http://camel.apache.org/schema/blueprint/cxf">
> <camel:camelContext id="VerySimple-context">
> <camel:route id="VerySimple-route">
> <camel:from uri="VerySimple"/>
> <camel:to uri="log:proxy.VerySimple"/>
> </camel:route>
> </camel:camelContext>
> <cxf:cxfEndpoint id="VerySimple"
> address="http://localhost:8088/VerySimple" serviceName="tns:VerySimple"
> endpointName="tns:VerySimplePort" wsdlURL="file:deploy/VerySimple.wsdl"
> xmlns:tns="http://www.talend.org/service/">
> <cxf:properties>
> <osgi:entry key="dataFormat" value="PAYLOAD"/>
> </cxf:properties>
> </cxf:cxfEndpoint>
> </osgi:blueprint>
> {code}
> received the following exception:
> {noformat}
> Exception: Failed to start route route1 because of null
> org.apache.camel.FailedToStartRouteException: Failed to start route route1
> because of null
> at
> org.apache.camel.impl.engine.RouteService.setUp(RouteService.java:132)
> at
> org.apache.camel.impl.engine.InternalRouteStartupManager.doInitRoutes(InternalRouteStartupManager.java:92)
> at
> org.apache.camel.impl.engine.AbstractCamelContext.doInit(AbstractCamelContext.java:2939)
> at
> org.apache.camel.support.service.BaseService.init(BaseService.java:83)
> at
> org.apache.camel.impl.engine.AbstractCamelContext.init(AbstractCamelContext.java:2620)
> at
> org.apache.camel.support.service.BaseService.start(BaseService.java:111)
> at
> org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2639)
> at
> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:255)
> at
> org.apache.camel.blueprint.BlueprintCamelContext.start(BlueprintCamelContext.java:241)
> at
> org.apache.camel.blueprint.BlueprintCamelContext.maybeStart(BlueprintCamelContext.java:283)
> at
> org.apache.camel.blueprint.BlueprintCamelContext.blueprintEvent(BlueprintCamelContext.java:188)
> at
> org.apache.aries.blueprint.container.BlueprintEventDispatcher$3.call(BlueprintEventDispatcher.java:197)
> at
> org.apache.aries.blueprint.container.BlueprintEventDispatcher$3.call(BlueprintEventDispatcher.java:195)
> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> at
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> at
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> at
> java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> at java.base/java.lang.Thread.run(Thread.java:829)
> Caused by: java.lang.IllegalArgumentException: camelContext must be specified
> at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:149)
> at
> org.apache.camel.support.DefaultEndpoint.doInit(DefaultEndpoint.java:488)
> at
> org.apache.camel.component.cxf.CxfEndpoint.doInit(CxfEndpoint.java:1071)
> at
> org.apache.camel.support.service.BaseService.init(BaseService.java:83)
> at
> org.apache.camel.support.service.ServiceHelper.initService(ServiceHelper.java:84)
> at
> org.apache.camel.impl.engine.RouteService.doSetup(RouteService.java:146)
> at
> org.apache.camel.impl.engine.RouteService.setUp(RouteService.java:130)
> ... 21 more
> {noformat}
> This worked in 2.x versions of Camel, but do not work in 3.x (tried several
> different versions). I am not sure if this is a bug or not, but at least in
> the migration notes from 2.x to 3.x there is nothing about this kind of
> no-java-class cxf endpoint definition being unsupported.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)