Hello Karsten,
thanks for you reply. The default rollout already provides the file
${KARAF_BASE}/etc/org.apache.activemq.server-default.cfg which is also mentioned
in the documentation at https://activemq.apache.org/osgi-integration.html.
Also, the activemq.xml file is present in the etc directory and looks okay for
me (compared to the one in Servicemix).
Both files are default and I did not touch them.
Walking through e.g. http://liquid-reality.de/Karaf-Tutorial/05/ leads to the
same issue.
Would be great if you could point me to the right direction ...
Cheers,
Heri
________________________________
Von: Karsten Blume <[email protected]>
Gesendet: Donnerstag, 5. Mai 2022 12:18
An: [email protected] <[email protected]>
Betreff: AW: Problems setting up Karaf with ActiveMQ and Blueprint
Hello Heribert,
You need to use the endpoint or the component parameters to define the broker
(URL, user, pwd,…).
You could configure the AMQ component as bean including the above parameters,
then all “activemq” endpoints in your context use this.
Or you define all the parameters in the endpoint URL.
The camel and karaf examples for AMQ should give a direction.
BR
Karsten
Von: Steuer Heribert <[email protected]>
Gesendet: Donnerstag, 5. Mai 2022 11:41
An: [email protected]
Betreff: AW: Problems setting up Karaf with ActiveMQ and Blueprint
Hello Erne,
thanks for your answer. I tried that already which leads to the same exception
(see below), just the endpoint looks a little bit different now.
11:38:38.860 ERROR [Blueprint Event Dispatcher: 1] Error occurred during
starting CamelContext: camel-6
org.apache.camel.FailedToCreateRouteException: Failed to create route test:
Route(test)[From[activemq:queue:in] -> [Log[PROCESSED MESSAG... because of
Failed to resolve endpoint: activemq://queue:in due to:
java.lang.IllegalArgumentException: wrong number of arguments
Any other ideas?
Cheers,
Heri
________________________________
Von: Tasi, Erne <[email protected]<mailto:[email protected]>>
Gesendet: Donnerstag, 5. Mai 2022 11:09
An: [email protected]<mailto:[email protected]>
<[email protected]<mailto:[email protected]>>
Betreff: AW: Problems setting up Karaf with ActiveMQ and Blueprint
Sorry, the correct URL to the Documentation would be ActiveMQ :: Apache
Camel<https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcamel.apache.org%2Fcomponents%2F3.16.x%2Factivemq-component.html&data=05%7C01%7Ckarsten.blume%40ottoint.com%7C82f7811134104a96b6a708da2e7b6737%7Cf73d6f0048944b4eba0071d6df45717d%7C0%7C0%7C637873405659914560%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=JFQ%2BxmNkecVRlf3dQTYwq51CQvh86kKid%2BsgnLx6V98%3D&reserved=0>.
At first I could not send the previous mail and afterwards something went wrong
as I copy-pasted my original answer.
Cheers,
Erne
Von: Tasi, Erne
Gesendet: Donnerstag, 5. Mai 2022 10:42
An: [email protected]<mailto:[email protected]>
Betreff: AW: Problems setting up Karaf with ActiveMQ and Blueprint
Hi Heri,
As the Exception states you did not provide all the needed arguments in you=
from and to statements.
According to the documentation ActiveMQ :: Apache Camel<https://camel.apach=
e.org/components/3.16.x/activemq-component.html<https://camel.apach=%20e.org/components/3.16.x/activemq-component.html>>
your Route would have to look something like this:
<route id="test">
<from uri="activemq:queue:in"/>
<log message="Message: ${body}"/>
<to uri="activemq:queue:out"/>
</route>
Best Regards,
Erne
Von: Steuer Heribert [mailto:[email protected]]
Gesendet: Donnerstag, 5. Mai 2022 09:57
An: [email protected]<mailto:[email protected]>
Betreff: Problems setting up Karaf with ActiveMQ and Blueprint
Hello,
we are currently trying to upgrade a couple of old Apache Servicemix
installations which came pre-bundled with Karaf, ActiveMQ, Camel and Blueprint
support. As it seems that Servicemix is no
longer maintained, I would like to set up a similar instance with Karaf and the
appropriate bundles.
Setup: Karaf 4.3.7 running on openjdk version "17.0.1" 2021-10-19
On a freshly unpacked Karaf instance, I execute the following commands:
feature:repo-add activemq 5.16.4
feature:repo-add camel 3.16.0
feature:repo-refresh
feature:install activemq-broker
feature:install camel-jms
feature:install camel-blueprint
Running a simple blueprint route (route attached below) that reads from a queue
and writes to another queue fails with:
2022-05-05T09:41:46,026 | ERROR | Blueprint Event Dispatcher: 1 |
BlueprintCamelContext | 213 - org.apache.camel.karaf.camel-blueprint
- 3.16.0 | Error occurred during starting CamelContext: camel-1
org.apache.camel.FailedToCreateRouteException: Failed to create route test:
Route(test)[From[activemq://in] -> [Log[PROCESSED MESSAGE],... because of
Failed to resolve endpoint: activemq://in due to:
java.lang.IllegalArgumentException: wrong number of arguments
I found some issues on the web related to that exception but all points refer
to packages that I do not use (activemq-camel). I have attached the full stack
trace below for completeness. I am pretty sure that this just
happens because of lack of knowledge, but I did not find a path out of that
problem. So hopefully one of you can point me to the right direction.
Cheers,
Heri
org.apache.camel.FailedToCreateRouteException: Failed to create route test:
Route(test)[From[activemq://in] -> [Log[PROCESSED MESSAGE],... because of
Failed to resolve endpoint: activemq://in due to:
java.lang.IllegalArgumentException: wrong number of arguments
at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:80)
~[!/:3.16.0]
at
org.apache.camel.impl.DefaultModelReifierFactory.createRoute(DefaultModelReifierFactory.java:49)
~[!/:3.16.0]
at
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:887)
~[!/:3.16.0]
at
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:775)
~[!/:3.16.0]
at
org.apache.camel.impl.engine.AbstractCamelContext.doInit(AbstractCamelContext.java:2937)
~[!/:3.16.0]
at org.apache.camel.support.service.BaseService.init(BaseService.java:83)
~[!/:3.16.0]
at
org.apache.camel.impl.engine.AbstractCamelContext.init(AbstractCamelContext.java:2620)
~[!/:3.16.0]
at org.apache.camel.support.service.BaseService.start(BaseService.java:111)
~[!/:3.16.0]
at
org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2639)
~[!/:3.16.0]
at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:255)
~[!/:3.16.0]
at
org.apache.camel.blueprint.BlueprintCamelContext.start(BlueprintCamelContext.java:241)
~[!/:3.16.0]
at
org.apache.camel.blueprint.BlueprintCamelContext.maybeStart(BlueprintCamelContext.java:283)
~[!/:3.16.0]
at
org.apache.camel.blueprint.BlueprintCamelContext.blueprintEvent(BlueprintCamelContext.java:188)
[!/:3.16.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:539) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
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:1136)
[?:?]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[?:?]
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve
endpoint: activemq://in due to: java.lang.IllegalArgumentException: wrong
number of arguments
at
org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:982)
~[!/:3.16.0]
at
org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(AbstractCamelContext.java:864)
~[!/:3.16.0]
at
org.apache.camel.support.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:58)
~[!/:3.16.0]
at
org.apache.camel.reifier.AbstractReifier.resolveEndpoint(AbstractReifier.java:191)
~[!/:3.16.0]
at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:94)
~[!/:3.16.0]
at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:74)
~[!/:3.16.0]
... 23 more
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException:
wrong number of arguments
at
org.apache.camel.util.IntrospectionSupport.extractProperties(IntrospectionSupport.java:41)
~[!/:3.16.0]
at
org.apache.activemq.camel.component.ActiveMQComponent.convertPathToActualDestination(ActiveMQComponent.java:161)
~[?:?]
at
org.apache.camel.component.jms.JmsComponent.createEndpoint(JmsComponent.java:1118)
~[?:?]
at
org.apache.camel.support.DefaultComponent.createEndpoint(DefaultComponent.java:171)
~[!/:3.16.0]
at
org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:948)
~[!/:3.16.0]
at
org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(AbstractCamelContext.java:864)
~[!/:3.16.0]
at
org.apache.camel.support.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:58)
~[!/:3.16.0]
at
org.apache.camel.reifier.AbstractReifier.resolveEndpoint(AbstractReifier.java:191)
~[!/:3.16.0]
at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:94)
~[!/:3.16.0]
at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:74)
~[!/:3.16.0]
... 23 more
Caused by: java.lang.IllegalArgumentException: wrong number of arguments
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at
jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
~[?:?]
at
jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at
org.apache.camel.util.IntrospectionSupport.extractProperties(IntrospectionSupport.java:39)
~[!/:3.16.0]
at
org.apache.activemq.camel.component.ActiveMQComponent.convertPathToActualDestination(ActiveMQComponent.java:161)
~[?:?]
at
org.apache.camel.component.jms.JmsComponent.createEndpoint(JmsComponent.java:1118)
~[?:?]
at
org.apache.camel.support.DefaultComponent.createEndpoint(DefaultComponent.java:171)
~[!/:3.16.0]
at
org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:948)
~[!/:3.16.0]
at
org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(AbstractCamelContext.java:864)
~[!/:3.16.0]
at
org.apache.camel.support.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:58)
~[!/:3.16.0]
at
org.apache.camel.reifier.AbstractReifier.resolveEndpoint(AbstractReifier.java:191)
~[!/:3.16.0]
at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:94)
~[!/:3.16.0]
at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:74)
~[!/:3.16.0]
... 23 more
Sample route:
<?xml version="1.0" encoding="UTF-8"?>
<blueprint
xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0<https://apc01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0&data=05%7C01%7Ckarsten.blume%40ottoint.com%7C82f7811134104a96b6a708da2e7b6737%7Cf73d6f0048944b4eba0071d6df45717d%7C0%7C0%7C637873405659914560%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2B1I%2B1%2F5AsKEnnwUyUVo0ybIxoDw9H65HbgGEsf8hWdc%3D&reserved=0>"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0<https://apc01.safelinks.protection.outlook.com/?url=http%3A%2F%2Faries.apache.org%2Fblueprint%2Fxmlns%2Fblueprint-cm%2Fv1.0.0&data=05%7C01%7Ckarsten.blume%40ottoint.com%7C82f7811134104a96b6a708da2e7b6737%7Cf73d6f0048944b4eba0071d6df45717d%7C0%7C0%7C637873405659914560%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=W1N%2Bur%2F2Q04v6kWpxrazvhwobOEGxm1LpNXCmgrgCBo%3D&reserved=0>">
<camelContext
xmlns="http://camel.apache.org/schema/blueprint<https://apc01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint&data=05%7C01%7Ckarsten.blume%40ottoint.com%7C82f7811134104a96b6a708da2e7b6737%7Cf73d6f0048944b4eba0071d6df45717d%7C0%7C0%7C637873405659914560%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=7Ue0w3OqWZV24X%2BI%2FJzOnjxw1iRmh%2F9jYjg%2F3DZLX7c%3D&reserved=0>">
<route id="test">
<from uri="activemq://in"/>
<log message="PROCESSED MESSAGE"/>
<to uri="activemq://out"/>
</route>
</camelContext>
</blueprint>
CENIT AG, Industriestrasse 52-54, 70565 Stuttgart, Tel.: +49 711 7825-30, Fax:
+49 711 7825-4000, Internet:
www.cenit.com<https://apc01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.cenit.com%2F&data=05%7C01%7Ckarsten.blume%40ottoint.com%7C82f7811134104a96b6a708da2e7b6737%7Cf73d6f0048944b4eba0071d6df45717d%7C0%7C0%7C637873405659914560%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=wQdx530TuACxlaMzzPbxcRFxLhHMqeb4p6SQS3rQMlw%3D&reserved=0>
Geschaeftsstellen (Branch Offices): Berlin, Frankfurt, Hamburg, Hannover,
Muenchen, Oelsnitz, Ratingen, Saarbruecken
Vorstandsmitglieder (Members of the Board): Peter Schneck, Dr. Markus Wesel
Aufsichtsratsmitglieder (Supervisory Board Members): Rainer Koppitz
(Vorsitzender des Aufsichtsrats / Chairman of the Supervisory Board), Prof. Dr.
Isabell Welpe, Ricardo Malta
Bankverbindungen (Bank Accounts):
Deutsche Bank (BLZ 600 700 70) Kto. 1661 040 IBAN : DE85 6007 0070 0166 1040 00
SWIFT-CODE : DEUTDESS,
Commerzbank (BLZ 600 400 71) Kto. 532 015 500 IBAN : DE83 6004 0071 0532 0155
00 SWIFT-Code : COBADEFF600,
Registergericht (Registry court): Amtsgericht Stuttgart
Handelsregister (Commercial Register): HRB Nr. 19117
Umsatzsteuer (VAT) ID: DE 147 862 777
CENIT AG, Industriestrasse 52-54, 70565 Stuttgart, Tel.: +49 711 7825-30, Fax:
+49 711 7825-4000, Internet: www.cenit.com<http://www.cenit.com>
Geschaeftsstellen (Branch Offices): Berlin, Frankfurt, Hamburg, Hannover,
Muenchen, Oelsnitz, Ratingen, Saarbruecken
Vorstandsmitglieder (Members of the Board): Peter Schneck, Dr. Markus Wesel
Aufsichtsratsmitglieder (Supervisory Board Members): Rainer Koppitz
(Vorsitzender des Aufsichtsrats / Chairman of the Supervisory Board), Prof. Dr.
Isabell Welpe, Ricardo Malta
Bankverbindungen (Bank Accounts):
Deutsche Bank (BLZ 600 700 70) Kto. 1661 040 IBAN : DE85 6007 0070 0166 1040 00
SWIFT-CODE : DEUTDESS,
Commerzbank (BLZ 600 400 71) Kto. 532 015 500 IBAN : DE83 6004 0071 0532 0155
00 SWIFT-Code : COBADEFF600,
Registergericht (Registry court): Amtsgericht Stuttgart
Handelsregister (Commercial Register): HRB Nr. 19117
Umsatzsteuer (VAT) ID: DE 147 862 777