camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe San <codeintheo...@gmail.com>
Subject Re: Camel Blueprint Test Error
Date Tue, 12 Mar 2013 17:50:41 GMT
Ok. Finally managed to get this resolved. The problem was in my route
definition, I used a different uri than what I have configured above as the
beanid for my ActiveMQ component.

Here is my route:


from("activemq:{{business.in.queue}}").unmarshal(jaxb).to("direct:Process");
// I used jms here instead of activemq and that was why I got the error as
above

        from("direct:Process").bean(new
BusinessProcessor()).to("direct:Processed");

        from("direct:Processed").bean(new BusinessEnricher()).tracing()

.setHeader("targetFileName").simple("${header.targetSystem}.${header.payloadFilename}").to("direct:sendToTarget");

So far so good. Now I have another problem. The ActiveMQ is a standalone
server listening for messages on tcp://localhost:1979. I can see that my
bundle is deployed and my routes are started. But on the ActiveMQ admin
console, I do not see any consumers attached. I'm surprised as the
connection to ActiveMQ got created and it is listening for messages but
nothing happens. Here is what I see in my service mix log files:

2013-03-12 18:40:25,535 | INFO  | rint Extender: 3 |
BlueprintCamelContext            | 85 - org.apache.camel.camel-core -
2.8.0.fuse-01-06 | Route: route173 started and consuming from:
Endpoint[activemq://BUSINESS.QUEUE1]
2013-03-12 18:40:25,542 | INFO  | rint Extender: 3 |
BlueprintCamelContext            | 85 - org.apache.camel.camel-core -
2.8.0.fuse-01-06 | Route: route174 started and consuming from:
Endpoint[direct://Process]
2013-03-12 18:40:25,549 | INFO  | rint Extender: 3 |
BlueprintCamelContext            | 85 - org.apache.camel.camel-core -
2.8.0.fuse-01-06 | Route: route175 started and consuming from:
Endpoint[direct://Processed]
2013-03-12 18:40:25,556 | INFO  | rint Extender: 3 |
BlueprintCamelContext            | 85 - org.apache.camel.camel-core -
2.8.0.fuse-01-06 | Route: route176 started and consuming from:
Endpoint[direct://sendToTarget]
2013-03-12 18:40:25,556 | INFO  | rint Extender: 3 |
BlueprintCamelContext            | 85 - org.apache.camel.camel-core -
2.8.0.fuse-01-06 | Total 4 routes, of which 4 is started.
2013-03-12 18:40:25,556 | INFO  | rint Extender: 3 |
BlueprintCamelContext            | 85 - org.apache.camel.camel-core -
2.8.0.fuse-01-06 | Apache Camel 2.8.0-fuse-01-06 (CamelContext: edrs-eim)
started in 0.833 seconds



On Tue, Mar 12, 2013 at 3:08 PM, Christian Müller <
christian.mueller@gmail.com> wrote:

> Can you share your route with us? Which version do you use?
>
> Sent from a mobile device
> Am 12.03.2013 11:00 schrieb "Joe San" <codeintheopen@gmail.com>:
>
> > Hi all,
> >
> > I'm using the Camel Blueprint Test Support to test my routes. I have the
> > following configured for my active mq definition....
> >
> >     <bean id="redeliveryPolicy"
> > class="org.apache.activemq.RedeliveryPolicy">
> >         <property name="maximumRedeliveries" value="0" />
> >     </bean>
> >
> >     <bean id="jmsConnectionFactory"
> > class="org.apache.activemq.ActiveMQConnectionFactory">
> >         <property name="brokerURL" value="${jms.brokerURL}" />
> >         <!--property name="userName" value="${jms.userName}" /-->
> >         <!--property name="password" value="${jms.password}" /-->
> >         <property name="watchTopicAdvisories" value="false" />
> >         <property name="alwaysSyncSend" value="true" />
> >         <property name="redeliveryPolicy" ref="redeliveryPolicy" />
> >     </bean>
> >
> >     <bean id="pooledConnectionFactory"
> > class="org.apache.activemq.pool.PooledConnectionFactory"
> >           init-method="start" destroy-method="stop">
> >         <property name="maxConnections" value="10" />
> >         <property name="connectionFactory" ref="jmsConnectionFactory" />
> >     </bean>
> >
> >     <bean id="jmsTransactionManager"
> > class="org.springframework.jms.connection.JmsTransactionManager">
> >         <property name="connectionFactory" ref="pooledConnectionFactory"
> />
> >     </bean>
> >
> >     <bean id="jmsConfig"
> > class="org.apache.camel.component.jms.JmsConfiguration">
> >         <property name="connectionFactory" ref="pooledConnectionFactory"
> />
> >         <property name="concurrentConsumers"
> > value="${jms.concurrentConsumers}" />
> >         <property name="transacted" value="true" />
> >         <property name="transactionTimeout" value="20000" />
> >         <property name="transactionManager" ref="jmsTransactionManager"
> />
> >     </bean>
> >
> >     <bean id="activemq"
> > class="org.apache.activemq.camel.component.ActiveMQComponent">
> >         <property name="configuration" ref="jmsConfig" />
> >     </bean>
> >
> > When I start my route, I get the following strange error:
> >
> > org.osgi.service.blueprint.container.ComponentDefinitionException: Unable
> > to intialize bean middleware-comp
> >     at
> >
> >
> org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:638)
> >     at
> >
> >
> org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:724)
> >     at
> >
> org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
> >     at
> >
> >
> org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)
> >     at
> >
> >
> org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:147)
> >     at
> >
> >
> org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:640)
> >     at
> >
> >
> org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:331)
> >     at
> >
> >
> org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:227)
> >     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
> Source)
> >     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> >     at java.util.concurrent.FutureTask.run(Unknown Source)
> >     at
> >
> >
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown
> > Source)
> >     at
> >
> >
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
> > Source)
> >     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
> > Source)
> >     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> >     at java.lang.Thread.run(Unknown Source)
> > Caused by: java.lang.IllegalArgumentException: connectionFactory must be
> > specified
> >     at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:290)
> >     at
> >
> >
> org.apache.camel.component.jms.JmsConfiguration.createConnectionFactory(JmsConfiguration.java:952)
> >     at
> >
> >
> org.apache.camel.component.jms.JmsConfiguration.getConnectionFactory(JmsConfiguration.java:372)
> >     at
> >
> >
> org.apache.camel.component.jms.JmsConfiguration.createListenerConnectionFactory(JmsConfiguration.java:961)
> >     at
> >
> >
> org.apache.camel.component.jms.JmsConfiguration.getListenerConnectionFactory(JmsConfiguration.java:391)
> >     at
> >
> >
> org.apache.camel.component.jms.JmsConfiguration.configureMessageListenerContainer(JmsConfiguration.java:822)
> >     at
> >
> >
> org.apache.camel.component.jms.JmsConfiguration.createMessageListenerContainer(JmsConfiguration.java:362)
> >     at
> >
> >
> org.apache.camel.component.jms.JmsEndpoint.createMessageListenerContainer(JmsEndpoint.java:162)
> >     at
> >
> >
> org.apache.camel.component.jms.JmsEndpoint.createConsumer(JmsEndpoint.java:157)
> >     at
> >
> >
> org.apache.camel.component.jms.JmsEndpoint.createConsumer(JmsEndpoint.java:68)
> >     at
> >
> >
> org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:65)
> >     at
> >
> org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:80)
> >     at org.apache.camel.impl.RouteService.warmUp(RouteService.java:133)
> >     at
> >
> >
> org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:1986)
> >     at
> >
> >
> org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1914)
> >     at
> >
> >
> org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1702)
> >     at
> >
> >
> org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1583)
> >     at
> >
> >
> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1444)
> >     at
> > org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
> >     at
> >
> >
> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1412)
> >     at
> >
> >
> org.apache.camel.blueprint.BlueprintCamelContext.maybeStart(BlueprintCamelContext.java:86)
> >     at
> >
> >
> org.apache.camel.blueprint.BlueprintCamelContext.init(BlueprintCamelContext.java:78)
> >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> >     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> >     at java.lang.reflect.Method.invoke(Unknown Source)
> >     at
> >
> >
> org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:226)
> >     at
> >
> org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:824)
> >     at
> >
> >
> org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:636)
> >     ... 15 more
> >
> > Regards,
> > Joe
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message