You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "valerian.merkling" <va...@capgemini.com> on 2013/04/15 17:09:06 UTC

Creating new processor components

Hi !

I'm trying to make a component from one of my processor.

I followed this  tutorial
<http://www.consulting-notes.com/2011/11/creating-custom-camel-component.html>  
which does not includes informations about installation and use.

Now my jar is here, i don't know where i have to put it, i tried /deploy but
i only get this error : 

/Caused by: org.apache.camel.NoSuchEndpointException: No endpoint could be
found for: helloworld, please check your classpath contains the needed Camel
component jar./

So where my .jar should go ? 

And do i have to write somethings more than /<to uri="helloworld"/>/ in my
route to make it works ?

Thanks for your help.

Regards, 

Valerian Merkling




--
View this message in context: http://camel.465427.n5.nabble.com/Creating-new-processor-components-tp5730919.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Creating new processor components

Posted by Christian Müller <ch...@gmail.com>.
A few useful links are:
http://camel.apache.org/creating-a-new-camel-component.html
http://camel.apache.org/writing-components.html
http://camel.apache.org/add-new-component-guide.html

Best,
Christian


On Mon, Apr 15, 2013 at 5:09 PM, valerian.merkling <
valerian.merkling@capgemini.com> wrote:

> Hi !
>
> I'm trying to make a component from one of my processor.
>
> I followed this  tutorial
> <
> http://www.consulting-notes.com/2011/11/creating-custom-camel-component.html
> >
> which does not includes informations about installation and use.
>
> Now my jar is here, i don't know where i have to put it, i tried /deploy
> but
> i only get this error :
>
> /Caused by: org.apache.camel.NoSuchEndpointException: No endpoint could be
> found for: helloworld, please check your classpath contains the needed
> Camel
> component jar./
>
> So where my .jar should go ?
>
> And do i have to write somethings more than /<to uri="helloworld"/>/ in my
> route to make it works ?
>
> Thanks for your help.
>
> Regards,
>
> Valerian Merkling
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Creating-new-processor-components-tp5730919.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Creating new processor components

Posted by "valerian.merkling" <va...@capgemini.com>.
Hi !


Claus Ibsen-2 wrote
> For the component name, then make sure the
> META-INF/services/org/apache/camel/component/helloworld file is
> included in the JAR. And that it refers to the component class name.
> 
> For example here is an example from camel-mybatis component:
> https://svn.apache.org/repos/asf/camel/trunk/components/camel-mybatis/src/main/resources/META-INF/services/org/apache/camel/component/mybatis

This par is ok. But i still have my error, and I don't know if the problem
is with the route, or with the helloworld.


Claus Ibsen-2 wrote
> You custom component is deploy the same way you deploy any of the
> Camel components that is shipped with Apache Camel.

I think that mean the problem isn't with Camel, but with servicemix ? It's
not what I did, but i can't find any information about how doing it right.

I've put my component in the deploy directory, and servicemix console tell
me my bundle is activated.
In the service tab, the type of my bundle is
/[org.apache.camel.spi.ComponentResolver]/, so i guess i'm on the right way.
Am i ?

Shall i search try to find answer on the fuse-servicemix forum ?



--
View this message in context: http://camel.465427.n5.nabble.com/Creating-new-processor-components-tp5730919p5730975.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Creating new processor components

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You custom component is deploy the same way you deploy any of the
Camel components that is shipped with Apache Camel.

So in some way of the other you need to add your JAR to the classpath
where you application runs. Or how you deploy it.

For the component name, then make sure the
META-INF/services/org/apache/camel/component/helloworld file is
included in the JAR. And that it refers to the component class name.

For example here is an example from camel-mybatis component:
https://svn.apache.org/repos/asf/camel/trunk/components/camel-mybatis/src/main/resources/META-INF/services/org/apache/camel/component/mybatis

Which you can find inside the camel-mybatis.jar from Apache Camel

On Mon, Apr 15, 2013 at 5:09 PM, valerian.merkling
<va...@capgemini.com> wrote:
> Hi !
>
> I'm trying to make a component from one of my processor.
>
> I followed this  tutorial
> <http://www.consulting-notes.com/2011/11/creating-custom-camel-component.html>
> which does not includes informations about installation and use.
>
> Now my jar is here, i don't know where i have to put it, i tried /deploy but
> i only get this error :
>
> /Caused by: org.apache.camel.NoSuchEndpointException: No endpoint could be
> found for: helloworld, please check your classpath contains the needed Camel
> component jar./
>
> So where my .jar should go ?
>
> And do i have to write somethings more than /<to uri="helloworld"/>/ in my
> route to make it works ?
>
> Thanks for your help.
>
> Regards,
>
> Valerian Merkling
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Creating-new-processor-components-tp5730919.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen