Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

java.lang.NoSuchMethodError: twitter4j.FilterQuery.setIncludeEntities(Z)Ltwitter4j/FilterQuery - flume

Solved Go to solution

java.lang.NoSuchMethodError: twitter4j.FilterQuery.setIncludeEntities(Z)Ltwitter4j/FilterQuery - flume

Explorer

Dear, I have the following configuration flume already have used it before and it worked: (also Add the flume-sources-1.0-SNAPSHOT jar in the directory of jars flume)

config-flume.png

The only thing that changed was update to version 1.5.2.2.4 flume and is giving me the following error.

ERROR [lifecycleSupervisor-1-2] (org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run:253) - Unable to start EventDrivenSourceRunner: { source:com.cloudera.flume.source.TwitterSource{name:Twitter,state:IDLE} } - Exception follows. java.lang.NoSuchMethodError: twitter4j.FilterQuery.setIncludeEntities(Z)Ltwitter4j/FilterQuery; at com.cloudera.flume.source.TwitterSource.start(TwitterSource.java:139) at org.apache.flume.source.EventDrivenSourceRunner.start(EventDrivenSourceRunner.java:44) at org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run(LifecycleSupervisor.java:251) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

Please your help if someone has the same error. Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: java.lang.NoSuchMethodError: twitter4j.FilterQuery.setIncludeEntities(Z)Ltwitter4j/FilterQuery - flume

This seems to be an issue due to more than one jar version available for a same class, one of that jar class doesn't have mentioned method in it therefore causing this issue.

Please make sure you have correct version of jar available in flume lib.

View solution in original post

5 REPLIES 5
Highlighted

Re: java.lang.NoSuchMethodError: twitter4j.FilterQuery.setIncludeEntities(Z)Ltwitter4j/FilterQuery - flume

This seems to be an issue due to more than one jar version available for a same class, one of that jar class doesn't have mentioned method in it therefore causing this issue.

Please make sure you have correct version of jar available in flume lib.

View solution in original post

Highlighted

Re: java.lang.NoSuchMethodError: twitter4j.FilterQuery.setIncludeEntities(Z)Ltwitter4j/FilterQuery - flume

Contributor

Your suggestion helped me to over come a fortnight problem .Thanks a ton !!!

Highlighted

Re: java.lang.NoSuchMethodError: twitter4j.FilterQuery.setIncludeEntities(Z)Ltwitter4j/FilterQuery - flume

Thanks @karthik sai, Please accept the answer to close this thread.

Highlighted

Re: java.lang.NoSuchMethodError: twitter4j.FilterQuery.setIncludeEntities(Z)Ltwitter4j/FilterQuery - flume

Expert Contributor

twitter4j jars included to Flume libs by default. However, twitter source from cloudera is built with another version of twitter4j framework.

I'd recommend to remove all *twitter4j* jars from flume_home/libs folder and add proper version (mentioned in cloudera's source pom) to aux_lib instead (along with custom source)

Highlighted

Re: java.lang.NoSuchMethodError: twitter4j.FilterQuery.setIncludeEntities(Z)Ltwitter4j/FilterQuery - flume

New Contributor

Hi i am getting same error but not getting solution can you please help me to get rid from there

Don't have an account?
Coming from Hortonworks? Activate your account here