apache / camel-karavan

Apache Camel Karavan a Low-code Data Integration Platform
https://camel.apache.org
Apache License 2.0
417 stars 143 forks source link

The Apache Camel not being able to find the Kamelet with the ID jms-apache-artemis-source #1042

Closed RafiIsaharov closed 6 months ago

RafiIsaharov commented 8 months ago

The camel-karavan service was installed in minikube v1.32.0 with the docker driver on Ubunto 22.04 via WSL2 on Windows 10 created a simple project from https://github.com/apache/camel-karavan/tree/main/karavan-demo/jms-to-kafka

When running via the Karavan UI dev mode the example from the link above, getting an error:

2024-01-01 09:43:39.856  WARN 15 --- [ ReloadOnDemand] support.RouteOnDemandReloadStrategy : Error reloading routes due to Failed to create route payment: Route(payment)[From[kamelet:jms-apache-artemis-source?broker... because of Failed to resolve endpoint: kamelet://jms-apache-artemis-source?brokerURL=tcp://172.28.132.151:61616&destinationName=payments&destinationType=queue due to: org.apache.camel.component.kamelet.KameletNotFoundException: Kamelet with id jms-apache-artemis-source not found in locations: file:/karavan/code,classpath:/kamelets,github:apache:camel-kamelets/kamelets. This exception is ignored.
org.apache.camel.FailedToCreateRouteException: Failed to create route payment: Route(payment)[From[kamelet:jms-apache-artemis-source?broker... because of Failed to resolve endpoint: kamelet://jms-apache-artemis-source?brokerURL=tcp://172.28.132.151:61616&destinationName=payments&destinationType=queue due to: org.apache.camel.component.kamelet.KameletNotFoundException: Kamelet with id jms-apache-artemis-source not found in locations: file:/karavan/code,classpath:/kamelets,github:apache:camel-kamelets/kamelets
        at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:82) ~[camel-core-reifier-4.1.0.jar:4.1.0]

image

When I downloaded in the demo pod the Artemis cli and checked the connection, it show the connection brockerURL with queues (see snapshot below)

image

Or when I build a demo container, I get below error (see snapshot below) :

image


Please help with this issue.

mgubaidullin commented 8 months ago

@davsclaus I can confirm that the following example

- route:
    id: route-f0b7
    nodePrefixId: route-d25
    from:
      id: from-130a
      uri: kamelet:jms-apache-artemis-source
      parameters:
        destinationName: test
        destinationType: queue
        brokerURL: tcp://localhost:61616
      steps:
        - log:
            id: log-e983
            message: ${body}

throws exception with camel-jbang

Error starting CamelContext (jms-demo) due to exception thrown: Failed to start route jms-apache-artemis-source-1 because of connectionFactory must be specified
org.apache.camel.FailedToStartRouteException: Failed to start route jms-apache-artemis-source-1 because of connectionFactory must be specified
        at org.apache.camel.impl.engine.RouteService.setUp(RouteService.java:131) ~[camel-base-engine-4.3.0.jar:4.3.0]
        at org.apache.camel.impl.engine.InternalRouteStartupManager.doWarmUpRoutes(InternalRouteStartupManager.java:307) ~[camel-base-engine-4.3.0.jar:4.3.0]
        at org.apache.camel.impl.engine.InternalRouteStartupManager.safelyStartRouteServices(InternalRouteStartupManager.java:187) ~[camel-base-engine-4.3.0.jar:4.3.0]
        at org.apache.camel.impl.engine.InternalRouteStartupManager.doStartOrResumeRoutes(InternalRouteStartupManager.java:144) ~[camel-base-engine-4.3.0.jar:4.3.0]
        at org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(AbstractCamelContext.java:2778) ~[camel-base-engine-4.3.0.jar:4.3.0]
        at org.apache.camel.impl.engine.AbstractCamelContext.doStartContext(AbstractCamelContext.java:2459) [camel-base-engine-4.3.0.jar:4.3.0]
        at org.apache.camel.impl.engine.AbstractCamelContext.doStart(AbstractCamelContext.java:2414) [camel-base-engine-4.3.0.jar:4.3.0]
        at org.apache.camel.support.service.BaseService.start(BaseService.java:113) [camel-api-4.3.0.jar:4.3.0]
        at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2019) [camel-base-engine-4.3.0.jar:4.3.0]
        at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:208) [camel-core-engine-4.3.0.jar:4.3.0]
        at org.apache.camel.main.KameletMain.doStart(KameletMain.java:323) [camel-kamelet-main-4.3.0.jar:4.3.0]
davsclaus commented 7 months ago

Its because of javax vs jakartaee - that seems to cause the CF to not be of correct type (jakartaee)

davsclaus commented 7 months ago

Okay its the kamelet that uses the wrong dependency - it should use

    <dependency>
        <groupId>org.apache.activemq</groupId>
        <artifactId>artemis-jakarta-client-all</artifactId>
        <version>2.31.2</version>
    </dependency>
davsclaus commented 7 months ago

Okay will be fixed in Camel 4.4

RafiIsaharov commented 7 months ago

Hi ,

Thank you for letting me know the issue will be fixed in Camel 4.4. I am looking forward to the update!

Best regards, Rafi

On Wed, Jan 17, 2024 at 8:50 PM Claus Ibsen @.***> wrote:

Okay will be fixed in Camel 4.4

— Reply to this email directly, view it on GitHub https://github.com/apache/camel-karavan/issues/1042#issuecomment-1896439879, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH42OH63MQMKVC2LCRRUMULYPAMP3AVCNFSM6AAAAABBJA4ZTGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJWGQZTSOBXHE . You are receiving this because you authored the thread.Message ID: @.***>