Re: ActiveMQ endpoint in Camel 3.0.0 reports an "java.lang.IllegalArgumentException: wrong number of arguments"

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ endpoint in Camel 3.0.0 reports an "java.lang.IllegalArgumentException: wrong number of arguments"

Andrea Cosentino-3
It's org.apache.camel.component.activemq.ActiveMQComponent

https://github.com/apache/camel/blob/master/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQComponent.java

The component you're using is from activemq-camel.

Il gio 2 gen 2020, 19:22 Gerald Kallas <[hidden email]> ha scritto:

> Dear community,
>
> I've set up a blueprint route with an endpoint as following
>
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
> <bean id="jmsConnectionFactory"
> class="org.apache.activemq.ActiveMQConnectionFactory">
> <property name="brokerURL" value="tcp://localhost:61616" />
> <property name="userName" value="xxxxx" />
> <property name="password" value="xxxxx" />
> </bean>
> <bean id="pooledConnectionFactory"
> class="org.apache.activemq.pool.PooledConnectionFactory"
> init-method="start" destroy-method="stop">
> <property name="maxConnections" value="8" />
> <property name="connectionFactory" ref="jmsConnectionFactory" />
> </bean>
> <bean id="jmsConfig"
> class="org.apache.camel.component.jms.JmsConfiguration">
> <property name="connectionFactory" ref="pooledConnectionFactory" />
> <property name="concurrentConsumers" value="1" />
> </bean>
> <bean id="activemq"
> class="org.apache.activemq.camel.component.ActiveMQComponent">
> <property name="configuration" ref="jmsConfig" />
> </bean>
> <camelContext id="file.queue" xmlns="
> http://camel.apache.org/schema/blueprint">
> <route id="file.queue">
> <from uri="file:/tmp/in?include=.*\.xml" />
> <log message="file.queue - Route started" />
> <to uri="activemq:queue:IN" />
> <log message="file.queue - Route finished" />
> </route>
> </camelContext>
> </blueprint>
>
> While trying to deploy the route the runtime reports an error
>
> Failed to resolve endpoint: activemq://queue:IN due to:
> java.lang.IllegalArgumentException: wrong number of arguments
>
> With Camel 2.24.2 it works.
>
> This link  https://issues.apache.org/jira/browse/CAMEL-13145 describes it
> as fixed. Do I still miss something?
>
> Any hints are highly appreciated.
>
> Thanks in advance
> - Gerald
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ endpoint in Camel 3.0.0 reports an "java.lang.IllegalArgumentException: wrong number of arguments"

Claus Ibsen-2
Hi

You need to use camel-activemq component which has a different class
name, the code above seems to be using activemq-camel.

On Thu, Jan 2, 2020 at 7:22 PM Gerald Kallas <[hidden email]> wrote:

>
> Dear community,
>
> I've set up a blueprint route with an endpoint as following
>
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
> <bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
> <property name="brokerURL" value="tcp://localhost:61616" />
> <property name="userName" value="xxxxx" />
> <property name="password" value="xxxxx" />
> </bean>
> <bean id="pooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory"
> init-method="start" destroy-method="stop">
> <property name="maxConnections" value="8" />
> <property name="connectionFactory" ref="jmsConnectionFactory" />
> </bean>
> <bean id="jmsConfig" class="org.apache.camel.component.jms.JmsConfiguration">
> <property name="connectionFactory" ref="pooledConnectionFactory" />
> <property name="concurrentConsumers" value="1" />
> </bean>
> <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
> <property name="configuration" ref="jmsConfig" />
> </bean>
> <camelContext id="file.queue" xmlns="http://camel.apache.org/schema/blueprint">
> <route id="file.queue">
> <from uri="file:/tmp/in?include=.*\.xml" />
> <log message="file.queue - Route started" />
> <to uri="activemq:queue:IN" />
> <log message="file.queue - Route finished" />
> </route>
> </camelContext>
> </blueprint>
>
> While trying to deploy the route the runtime reports an error
>
> Failed to resolve endpoint: activemq://queue:IN due to: java.lang.IllegalArgumentException: wrong number of arguments
>
> With Camel 2.24.2 it works.
>
> This link  https://issues.apache.org/jira/browse/CAMEL-13145 describes it as fixed. Do I still miss something?
>
> Any hints are highly appreciated.
>
> Thanks in advance
> - Gerald



--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ endpoint in Camel 3.0.0 reports an "java.lang.IllegalArgumentException: wrong number of arguments"

Gerald Kallas - mailbox.org
Tx, this solved the problem.

Best
- Gerald

> Claus Ibsen <[hidden email]> hat am 2. Januar 2020 um 19:35 geschrieben:
>
>
> Hi
>
> You need to use camel-activemq component which has a different class
> name, the code above seems to be using activemq-camel.
>
> On Thu, Jan 2, 2020 at 7:22 PM Gerald Kallas <[hidden email]> wrote:
> >
> > Dear community,
> >
> > I've set up a blueprint route with an endpoint as following
> >
> > <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
> > <bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
> > <property name="brokerURL" value="tcp://localhost:61616" />
> > <property name="userName" value="xxxxx" />
> > <property name="password" value="xxxxx" />
> > </bean>
> > <bean id="pooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory"
> > init-method="start" destroy-method="stop">
> > <property name="maxConnections" value="8" />
> > <property name="connectionFactory" ref="jmsConnectionFactory" />
> > </bean>
> > <bean id="jmsConfig" class="org.apache.camel.component.jms.JmsConfiguration">
> > <property name="connectionFactory" ref="pooledConnectionFactory" />
> > <property name="concurrentConsumers" value="1" />
> > </bean>
> > <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
> > <property name="configuration" ref="jmsConfig" />
> > </bean>
> > <camelContext id="file.queue" xmlns="http://camel.apache.org/schema/blueprint">
> > <route id="file.queue">
> > <from uri="file:/tmp/in?include=.*\.xml" />
> > <log message="file.queue - Route started" />
> > <to uri="activemq:queue:IN" />
> > <log message="file.queue - Route finished" />
> > </route>
> > </camelContext>
> > </blueprint>
> >
> > While trying to deploy the route the runtime reports an error
> >
> > Failed to resolve endpoint: activemq://queue:IN due to: java.lang.IllegalArgumentException: wrong number of arguments
> >
> > With Camel 2.24.2 it works.
> >
> > This link  https://issues.apache.org/jira/browse/CAMEL-13145 describes it as fixed. Do I still miss something?
> >
> > Any hints are highly appreciated.
> >
> > Thanks in advance
> > - Gerald
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2