Hi,

A quick question, did you already install camel-core feature?

Freeman
-------------
Freeman Fang

FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042

On 2012-8-21, at 上午12:05, curtisa wrote:

> Hi,
> I'm getting started with SM 4.4.2 on OSX and I'm facing a problem with the
> simplest of tests involving blueprint, POJO beans and ActiveMQ. All I've
> done to the standard SM install was to install camel-jaxb and change the
> active mq address from 'localhost' to the actual IP address (so other
> machines can connect to the broker) . 
> 
> The route I'm trying to create goes File -> AMQ A -> bean -> AMQ B
> 
> However I'm getting an "unable to start blueprint container" error as soon
> as I drop the .jar and the .xml into the deploy folder. (I first start
> ServiceMix then deploy the jar then the blueprint xml. My jar has camel-core
> in it for the @Body notation) 
> 
> I've followed the tutorial and tried to google the exceptions but hasn't
> helped. Hope someone has an idea what I'm doing wrong (it's been driving me
> nuts all day) ….
> 
> - Alex 
> 
> My blueprint xml is :
> ------
> <?xml version="1.0" encoding="UTF-8"?>
> <blueprint
>    xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";
>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>    xsi:schemaLocation="
>      http://www.osgi.org/xmlns/blueprint/v1.0.0
>      http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd";>
> 
>    <bean id="helloWorldBean" class="com.mydomain.HelloWorldBean"
> init-method="init">
>        <argument value="1"/> 
>    </bean>  
> 
>    <camelContext xmlns="http://camel.apache.org/schema/blueprint";>
>        <route> 
>            <from
> uri="file:///Applications/apache-servicemix-4.4.2/activemq/input_helloworld"/>
>   
>            <log message="Processing file : ${file:name}"/>
>            <to uri="activemq:queue://JOBS.queue.static.helloworld" /> 
>        </route>
> 
>        <route> 
>          <from uri="activemq:queue://JOBS.queue.static.helloworld" /> 
>          <bean ref="helloWorldBean" method="giveMeFileContents"/>
>          <to uri="activemq:queue://JOBS.queue.events" /> 
>        </route>
>    </camelContext>
> 
> </blueprint>
> 
> -----
> 
> My POJO / bean is 
> 
> package com.mydomain;
> 
> import java.io.InputStream;
> import org.apache.camel.Body;
> 
> public class HelloWorldBean {
>    private long myId = 0L;
> 
>    public HelloWorldBean(long myId) {
>        this.myId = myId;
>    }
> 
>    public void init(){
>        System.out.println("Bean initialized");
>    }
> 
>    public String giveMeFileContents(@Body InputStream body){
>        return "Hi Id of " + myId + ".\nThe contents of you file is ...\n" +
> body;
>    }
> }
> 
> 
> and the (shortened) exception stack is …
> 
> 2012-08-20 16:09:48,533 | ERROR | rint Extender: 2 | BlueprintContainerImpl   
>        
> | ?                                   ? | 10 - org.apache.aries.blueprint -
> 0.3.1 | Unable to start blueprint container for bundle helloWorld.xml
> org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to
> intialize bean camel-1
>       at
> org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:638)[10:org.apache.aries.blueprint:0.3.1]
>       at
> org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:724)[10:org.apache.aries.blueprint:0.3.1]
>       at
> org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)[10:org.apache.aries.blueprint:0.3.1]
>       at
> org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)[10:org.apache.aries.blueprint:0.3.1]
> .
> .
> Caused by: org.apache.camel.RuntimeCamelException:
> java.lang.IllegalArgumentException: Invalid URI, no
> org.apache.camel.spi.Language registered for scheme : file
>       at 
> org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:841)
>       at
> org.apache.camel.component.file.GenericFileEndpoint.createGenericFileStrategy(GenericFileEndpoint.java:221)
>       at
> org.apache.camel.component.file.GenericFileEndpoint.getGenericFileProcessStrategy(GenericFileEndpoint.java:132)
>       at
> org.apache.camel.component.file.GenericFileConsumer.doStart(GenericFileConsumer.java:548)
>       at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
>       at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
> .
> .
> Caused by: java.lang.IllegalArgumentException: Invalid URI, no
> org.apache.camel.spi.Language registered for scheme : file
>       at
> org.apache.camel.impl.osgi.Activator$BaseResolver.createInstance(Activator.java:405)
>       at
> org.apache.camel.impl.osgi.Activator$BaseResolver.createInstance(Activator.java:391)
>       at
> org.apache.camel.impl.osgi.Activator$BundleLanguageResolver.resolveLanguage(Activator.java:212)
> 
> 
> 
> 
> --
> View this message in context: 
> http://servicemix.396122.n5.nabble.com/Problem-with-simple-Blueprint-Bean-AMQ-example-tp5714184.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to