Miroslav Borský created CAMEL-18094:
---------------------------------------
Summary: 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
Affects Versions: 3.x
Environment: karaf 4.4
Java 11
camel 3.16.0
Reporter: Miroslav Borský
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)