Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No endpoint found for Smooks after explicitly adding dependency with kamel #2437

Closed
jeffgbradley2 opened this issue Jun 23, 2021 · 3 comments

Comments

@jeffgbradley2
Copy link

jeffgbradley2 commented Jun 23, 2021

The following route contains a Smooks endpoint.

<routes xmlns="http://camel.apache.org/schema/spring">
  <route id="route-1">
      <from uri="direct:in" />
      <to uri="smooks:/etc/camel/resources/smooks-config.xml" />
  </route>
  <route id="route-1a">
      <from uri="direct:smooks" />
      <to uri="log:info" />
  </route>
</routes>

The Smooks component is located in the smooks-camel-cartridge maven artifact. We have used it with Camel in this manner and are hoping to use it with Camel K.

Following the Camel K docs, that dependency, other required Smooks dependencies, and the smooks-config.xml resource file are added to the build with the following kamel command.

kamel run --resource smooks-config.xml -d mvn:org.smooks:smooks-core:2.0.0-M3 -d mvn:org.smooks.cartridges:smooks-javabean-cartridge:2.0.0-M3 -d mvn:org.smooks.cartridges:smooks-camel-cartridge:2.0.0-M3 smooks-route.xml --dev

Running the command results in the following exception:

Failed to start application: org.apache.camel.FailedToCreateRouteException: Failed to create route route-1 at: >>> To[smooks:/etc/camel/resources/smooks-config.xml] <<< in route: Route(route-1)[From[direct:in] -> [To[smooks:/etc/camel/reso... because of No endpoint could be found for: smooks:///etc/camel/resources/smooks-config.xml, please check your classpath contains the needed Camel component jar.

Observing the logs, it appears that the Smooks jars are being added successfully. Complete log follows.

integration "smooks-route" created
Condition "IntegrationPlatformAvailable" is "True" for Integration smooks-route: camel-basic/camel-k
Progress: integration "smooks-route" in phase Initialization
Progress: integration "smooks-route" in phase Building Kit
Integration smooks-route in phase "Initialization"
Progress: integration "smooks-route" in phase Deploying
Integration smooks-route in phase "Building Kit"
Integration smooks-route in phase "Deploying"
Condition "IntegrationKitAvailable" is "True" for Integration smooks-route: kit-c39l0r1m3tt0p54kimj0
Progress: integration "smooks-route" in phase Running
Condition "DeploymentAvailable" is "True" for Integration smooks-route: deployment name is smooks-route
Condition "CronJobAvailable" is "False" for Integration smooks-route: different controller strategy used (deployment)
Condition "ServiceAvailable" is "False" for Integration smooks-route: no http service required
Condition "ExposureAvailable" is "False" for Integration smooks-route: no host or service defined
Integration smooks-route in phase "Running"
Condition "Ready" is "False" for Integration smooks-route
[1] Monitoring pod smooks-route-89759496d-7gsmv
[1] exec java -cp ./resources:/etc/camel/application.properties:/etc/camel/resources:/etc/camel/resources/smooks-config.xml:/etc/camel/sources/smooks-route.xml:dependencies/app/camel-k-integration-1.4.0.jar:dependencies/lib/boot/io.quarkus.quarkus-bootstrap-runner-1.13.0.Final.jar:dependencies/lib/boot/io.quarkus.quarkus-development-mode-spi-1.13.0.Final.jar:dependencies/lib/boot/io.smallrye.common.smallrye-common-io-1.5.0.jar:dependencies/lib/boot/org.graalvm.sdk.graal-sdk-21.0.0.jar:dependencies/lib/boot/org.jboss.logging.jboss-logging-3.4.1.Final.jar:dependencies/lib/boot/org.jboss.logmanager.jboss-logmanager-embedded-1.0.9.jar:dependencies/lib/boot/org.wildfly.common.wildfly-common-1.5.4.Final-format-001.jar:dependencies/lib/main/com.fasterxml.aalto-xml-1.2.2.jar:dependencies/lib/main/com.fasterxml.classmate-1.3.4.jar:dependencies/lib/main/com.fasterxml.woodstox.woodstox-core-6.1.1.jar:dependencies/lib/main/com.google.code.findbugs.jsr305-3.0.2.jar:dependencies/lib/main/com.thoughtworks.xstream.xstream-1.4.16.jar:dependencies/lib/main/commons-lang.commons-lang-2.6.jar:dependencies/lib/main/io.github.x-stream.mxparser-1.2.1.jar:dependencies/lib/main/io.quarkus.arc.arc-1.13.0.Final.jar:dependencies/lib/main/io.quarkus.quarkus-arc-1.13.0.Final.jar:dependencies/lib/main/io.quarkus.quarkus-core-1.13.0.Final.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-annotation-1.5.0.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-classloader-1.5.0.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-constraint-1.5.0.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-expression-1.5.0.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-function-1.5.0.jar:dependencies/lib/main/io.smallrye.config.smallrye-config-1.11.1.jar:dependencies/lib/main/io.smallrye.config.smallrye-config-common-1.11.1.jar:dependencies/lib/main/jakarta.annotation.jakarta.annotation-api-1.3.5.jar:dependencies/lib/main/jakarta.el.jakarta.el-api-3.0.3.jar:dependencies/lib/main/jakarta.enterprise.jakarta.enterprise.cdi-api-2.0.2.jar:dependencies/lib/main/jakarta.inject.jakarta.inject-api-1.0.jar:dependencies/lib/main/jakarta.interceptor.jakarta.interceptor-api-1.2.5.jar:dependencies/lib/main/jakarta.transaction.jakarta.transaction-api-1.3.3.jar:dependencies/lib/main/javax.transaction.jta-1.1.jar:dependencies/lib/main/jaxen.jaxen-1.2.0.jar:dependencies/lib/main/org.apache.camel.camel-api-3.9.0.jar:dependencies/lib/main/org.apache.camel.camel-base-3.9.0.jar:dependencies/lib/main/org.apache.camel.camel-base-engine-3.9.0.jar:dependencies/lib/main/org.apache.camel.camel-bean-3.9.0.jar:dependencies/lib/main/org.apache.camel.camel-componentdsl-3.9.0.jar:dependencies/lib/main/org.apache.camel.camel-core-catalog-3.9.0.jar:dependencies/lib/main/org.apache.camel.camel-core-engine-3.9.0.jar:dependencies/lib/main/org.apache.camel.camel-core-languages-3.9.0.jar:dependencies/lib/main/org.apache.camel.camel-core-model-3.9.0.jar:dependencies/lib/main/org.apache.camel.camel-core-processor-3.9.0.jar:dependencies/lib/main/org.apache.camel.camel-core-reifier-3.9.0.jar:dependencies/lib/main/org.apache.camel.camel-direct-3.9.0.jar:dependencies/lib/main/org.apache.camel.camel-endpointdsl-3.9.0.jar:dependencies/lib/main/org.apache.camel.camel-log-3.9.0.jar:dependencies/lib/main/org.apache.camel.camel-main-3.9.0.jar:dependencies/lib/main/org.apache.camel.camel-management-api-3.9.0.jar:dependencies/lib/main/org.apache.camel.camel-microprofile-config-3.9.0.jar:dependencies/lib/main/org.apache.camel.camel-support-3.9.0.jar:dependencies/lib/main/org.apache.camel.camel-tooling-model-3.9.0.jar:dependencies/lib/main/org.apache.camel.camel-util-3.9.0.jar:dependencies/lib/main/org.apache.camel.camel-util-json-3.9.0.jar:dependencies/lib/main/org.apache.camel.camel-xml-io-3.9.0.jar:dependencies/lib/main/org.apache.camel.camel-xml-io-dsl-3.9.0.jar:dependencies/lib/main/org.apache.camel.k.camel-k-core-1.7.0.jar:dependencies/lib/main/org.apache.camel.k.camel-k-core-api-1.7.0.jar:dependencies/lib/main/org.apache.camel.k.camel-k-core-support-1.7.0.jar:dependencies/lib/main/org.apache.camel.k.camel-k-runtime-1.7.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-bean-1.8.1.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-core-1.8.1.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-direct-1.8.1.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-log-1.8.1.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-support-common-1.8.1.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-xml-io-dsl-1.8.1.jar:dependencies/lib/main/org.codehaus.woodstox.stax2-api-4.2.jar:dependencies/lib/main/org.eclipse.microprofile.config.microprofile-config-api-1.4.jar:dependencies/lib/main/org.eclipse.microprofile.context-propagation.microprofile-context-propagation-api-1.0.1.jar:dependencies/lib/main/org.freemarker.freemarker-2.3.31.jar:dependencies/lib/main/org.jboss.logging.jboss-logging-annotations-2.2.0.Final.jar:dependencies/lib/main/org.jboss.slf4j.slf4j-jboss-logmanager-1.1.0.Final.jar:dependencies/lib/main/org.jboss.threads.jboss-threads-3.2.0.Final.jar:dependencies/lib/main/org.mvel.mvel2-2.4.12.Final.jar:dependencies/lib/main/org.slf4j.slf4j-api-1.7.30.jar:dependencies/lib/main/org.smooks.cartridges.smooks-camel-cartridge-2.0.0-M3.jar:dependencies/lib/main/org.smooks.cartridges.smooks-javabean-cartridge-2.0.0-M3.jar:dependencies/lib/main/org.smooks.smooks-api-2.0.0-M3.jar:dependencies/lib/main/org.smooks.smooks-commons-2.0.0-M3.jar:dependencies/lib/main/org.smooks.smooks-core-2.0.0-M3.jar:dependencies/lib/main/xml-apis.xml-apis-1.4.01.jar:dependencies/lib/main/xmlpull.xmlpull-1.1.3.1.jar:dependencies/quarkus-app-dependencies.txt:dependencies/quarkus-run.jar:dependencies/quarkus/generated-bytecode.jar:dependencies/quarkus/quarkus-application.dat io.quarkus.bootstrap.runner.QuarkusEntryPoint
Condition "Ready" is "True" for Integration smooks-route
[1] 2021-06-23 16:36:06,514 INFO  [org.apa.cam.k.Runtime] (main) Apache Camel K Runtime 1.7.0
[1] 2021-06-23 16:36:06,552 INFO  [org.apa.cam.qua.cor.CamelBootstrapRecorder] (main) bootstrap runtime: org.apache.camel.quarkus.main.CamelMainRuntime
[1] 2021-06-23 16:36:06,660 INFO  [org.apa.cam.k.lis.SourcesConfigurer] (main) Loading routes from: SourceDefinition{name='smooks-route', language='xml', location='file:/etc/camel/sources/smooks-route.xml', }
[1] 2021-06-23 16:36:06,863 ERROR [org.apa.cam.qua.mai.CamelMainRuntime] (main) Failed to start application: org.apache.camel.FailedToCreateRouteException: Failed to create route route-1 at: >>> To[smooks:/etc/camel/resources/smooks-config.xml] <<< in route: Route(route-1)[From[direct:in] -> [To[smooks:/etc/camel/reso... because of No endpoint could be found for: smooks:///etc/camel/resources/smooks-config.xml, please check your classpath contains the needed Camel component jar.
[1]     at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:240)
[1]     at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:74)
[1]     at org.apache.camel.quarkus.core.FastCamelContext.startRouteDefinitions(FastCamelContext.java:949)
[1]     at org.apache.camel.quarkus.core.FastCamelContext.startRouteDefinitions(FastCamelContext.java:670)
[1]     at org.apache.camel.impl.engine.AbstractCamelContext.doInit(AbstractCamelContext.java:2771)
[1]     at org.apache.camel.quarkus.core.FastCamelContext.doInit(FastCamelContext.java:546)
[1]     at org.apache.camel.support.service.BaseService.init(BaseService.java:83)
[1]     at org.apache.camel.impl.engine.AbstractCamelContext.init(AbstractCamelContext.java:2490)
[1]     at org.apache.camel.support.service.BaseService.start(BaseService.java:111)
[1]     at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2507)
[1]     at org.apache.camel.quarkus.main.CamelMain.doStart(CamelMain.java:94)
[1]     at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
[1]     at org.apache.camel.quarkus.main.CamelMain.startEngine(CamelMain.java:139)
[1]     at org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:49)
[1]     at org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:45)
[1]     at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot-173480958.deploy_0(CamelBootstrapProcessor$boot-173480958.zig:101)
[1]     at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot-173480958.deploy(CamelBootstrapProcessor$boot-173480958.zig:40)
[1]     at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:512)
[1]     at io.quarkus.runtime.Application.start(Application.java:90)
[1]     at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:100)
[1]     at io.quarkus.runtime.Quarkus.run(Quarkus.java:66)
[1]     at io.quarkus.runtime.Quarkus.run(Quarkus.java:42)
[1]     at io.quarkus.runtime.Quarkus.run(Quarkus.java:119)
[1]     at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29)
[1]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[1]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[1]     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[1]     at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[1]     at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:48)
[1]     at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:25)
[1] Caused by: org.apache.camel.NoSuchEndpointException: No endpoint could be found for: smooks:///etc/camel/resources/smooks-config.xml, please check your classpath contains the needed Camel component jar.
[1]     at org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:969)
[1]     at org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(AbstractCamelContext.java:845)
[1]     at org.apache.camel.support.CamelContextHelper.resolveEndpoint(CamelContextHelper.java:123)
[1]     at org.apache.camel.reifier.SendReifier.resolveEndpoint(SendReifier.java:43)
[1]     at org.apache.camel.reifier.SendReifier.createProcessor(SendReifier.java:36)
[1]     at org.apache.camel.reifier.ProcessorReifier.makeProcessor(ProcessorReifier.java:835)
[1]     at org.apache.camel.reifier.ProcessorReifier.addRoutes(ProcessorReifier.java:576)
[1]     at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:236)
[1]     ... 29 more```
@lburgazzoli
Copy link
Contributor

I think this happen because there's no extension for quarkus so the FastFactoryFinder cannot find it.

@ppalaga @jamesnetherton I wonder if we should have the FastFactoryFinder to optionally fallback to the classic camel factory finder mechanic for this bring your own component use case.

@ppalaga
Copy link

ppalaga commented Jun 29, 2021

It seems to be a valid use case. Although, I wonder whether we shouldn't rather encourage end users to create proper Quarkus extensions for their custom components so that they can leverage all the advantages that it brings? In this particular case the extension would be quite trivial and to make it viable for end users, we'd "just" need to document it.

@ppalaga
Copy link

ppalaga commented Jun 29, 2021

I have filed apache/camel-quarkus#2855

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants