camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From contactreji <contactr...@gmail.com>
Subject Camel Twitter Consumer - DirectMessage
Date Sat, 20 Dec 2014 07:41:51 GMT
Hi friends

I was trying integrate an application with Twitter. My use case demands that
I should read DirectMessages of a user and store it into a DB containing 2
columns. SenderScreeName and MessageText.

I am using Camel 2.13.0 version and I have following route
<from
<b>			
uri="twitter://directmessage?type=polling&amp;delay=120000&amp;consumerKey=******&amp;consumerSecret=*****&amp;accessToken=****&amp;accessTokenSecret=****&amp;useSSL=true"
/>

<to uri="bean:Handleposts" />
		</route>*

While using a debugger, I noticed that it returns object of type
twitter4j.internal.json.DirectMessageJSONImpl .. now I am trying to
instantiate that class in my Java Processor it looks like it cannot find the
"*DirectMessageJSONImpl*" in the classpath.

I have camel-twitter dependency in my POM file.
*<dependency>
			<groupId>org.apache.camel</groupId>
			<artifactId>camel-twitter</artifactId>
			<version>2.13.0</version>
		</dependency>*


Where can I get the *DirectMessageJSONImpl.class* now. Which maven
dependency should I use here? I tried using *twitter4j-core* dependency but
when I start the route I get error as follows.

*[d #0 - twitter://directmessage] TwitterConsumerPolling         WARN 
Consumer
Consumer[twitter://directmessage?accessToken=***-****&accessTokenSecret=*****&consumerKey=*****&consumerSecret=********&delay=120000&type=polling&useSSL=true]
failed polling endpoint:
Endpoint[twitter://directmessage?accessToken=******-******&accessTokenSecret=*****&consumerKey=*****&consumerSecret=*******&delay=120000&type=polling&useSSL=true].
Will try again at next poll. Caused by: [java.lang.NoSuchMethodError -
twitter4j.conf.ConfigurationBuilder.setUseSSL(Z)Ltwitter4j/conf/ConfigurationBuilder;]
java.lang.NoSuchMethodError:
twitter4j.conf.ConfigurationBuilder.setUseSSL(Z)Ltwitter4j/conf/ConfigurationBuilder;
*



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Twitter-Consumer-DirectMessage-tp5760940.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message