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.

Reply via email to