Hi

Yeah take a look at the Camel Karaf features when you use OSGi, as
each of these Camel components shows which valid OSGi bundles to
use/install.

The features.xml file is in maven central for each release
http://central.maven.org/maven2/org/apache/camel/karaf/apache-camel/2.12.2/

On Wed, Dec 4, 2013 at 6:11 AM, Goyal, Arpit <[email protected]> wrote:
> Okay problem solved myself... Picked the existing OSGi bundle for twitter4j
>
> <dependency>
>   <groupId>org.apache.servicemix.bundles</groupId>
>   <artifactId>org.apache.servicemix.bundles.twitter4j</artifactId>
>   <version>3.0.5_1</version>
> </dependency>
>
> -----Original Message-----
> From: Goyal, Arpit [mailto:[email protected]]
> Sent: Wednesday, December 04, 2013 9:01 AM
> To: [email protected]
> Subject: Twitter component on Equinox OSGi (Blueprint)
>
> Hello Colleagues,
>
> I have setup camel 2.11.2 on equinox OSGi runtime (along with camel-blueprint 
> bundle) and now I am trying to get the Camel-Twitter component running. As 
> per the component project, Camel Twitter depends upon two additional bundles 
> which aren't available on my runtime (twitter4j-stream & twitter4j-core). I 
> have used Eclipse to convert the twitter4j-core & twitter4j-stream jars into 
> OSGi bundles. Now the camel-twitter and the two additional bundles are in 
> ACTIVE state.
>
> On deploying a simple blueprint route (as shown below), I am getting the 
> error that twitter4j.Twitter NoClassDefFoundError. Any idea what is wrong?
>
> <blueprint xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0 
> xmlns:camel=http://camel.apache.org/schema/blueprint/>
> <camel:camelContext id="TestTwitter" streamCache="true">
> <camel:endpoint id="Sender_" 
> uri="file:///tmp/demo?flatten=true&amp;move=.done&amp;fileName=input.txt"/>
> <camel:endpoint id="TSender" 
> uri="twitter://search?type=direct&amp;keywords=camel&amp;consumerKey=<removed>&amp;consumerSecret=<removed>&amp;accessToken=<removed>&amp;accessTokenSecret=<removed>"/>
> <camel:endpoint id="Receiver1_" uri="file:///tmp/demo?fileName=out.txt"/>
> <camel:route>
> <camel:from ref="TSender"/>
> <camel:to ref="Receiver1_"/>
> </camel:route>
> </camel:camelContext>
> </blueprint>
>
> Error Log:
>
> Caused by: java.lang.NoClassDefFoundError: twitter4j/Twitter
>        at java.lang.Class.getDeclaredMethods0(Native Method)
>        at java.lang.Class.privateGetDeclaredMethods(Class.java:2442)
>        at java.lang.Class.privateGetPublicMethods(Class.java:2562)
>        at java.lang.Class.getMethods(Class.java:1427)
>        at 
> org.apache.camel.util.IntrospectionSupport.findSetterMethods(IntrospectionSupport.java:588)
>        at 
> org.apache.camel.util.IntrospectionSupport.findSetterMethods(IntrospectionSupport.java:608)
>        at 
> org.apache.camel.util.IntrospectionSupport.setProperty(IntrospectionSupport.java:467)
>        at 
> org.apache.camel.util.IntrospectionSupport.setProperty(IntrospectionSupport.java:546)
>        at 
> org.apache.camel.util.IntrospectionSupport.setProperties(IntrospectionSupport.java:434)
>        at 
> org.apache.camel.util.EndpointHelper.setProperties(EndpointHelper.java:249)
>        at 
> org.apache.camel.impl.DefaultComponent.setProperties(DefaultComponent.java:258)
>        at 
> org.apache.camel.component.twitter.TwitterComponent.createEndpoint(TwitterComponent.java:46)
>        at 
> org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:119)
>        at 
> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:489)
>        at
>
> Regards,
> Arpit.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [email protected]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to