0

I'm following a tutorial http://www.javacodegeeks.com/2012/03/twitter4j-and-esper-tracking-user.html. But when I'm trying to compile the project it gives me follwoing error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/antlr/runtime/RecognizerSharedState
    at com.espertech.esper.epl.generated.EsperEPL2GrammarLexer.<init>(EsperEPL2GrammarLexer.java:326)
    at com.espertech.esper.epl.parse.ParseHelper.parse(ParseHelper.java:99)
    at com.espertech.esper.core.EPAdministratorImpl.compileEPL(EPAdministratorImpl.java:299)
    at com.espertech.esper.core.EPAdministratorImpl.createEPLStmt(EPAdministratorImpl.java:142)
    at com.espertech.esper.core.EPAdministratorImpl.createEPL(EPAdministratorImpl.java:94)
    at com.twitter.message.TwitterTest.main(TwitterTest.java:39)
Caused by: java.lang.ClassNotFoundException: org.antlr.runtime.RecognizerSharedState
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 6 more

I have added the relevant jars esper-4.9.0.jar, antlr-3.0.1.jar, twitter4j-core-2.2.6.jar. Please help me in resolving errors as I have done lot of google but there is as such no solution found.

Ezhil V
  • 894
  • 5
  • 11
Zelig
  • 45
  • 1
  • 3
  • 10

1 Answers1

0

antlr-runtime-3.2.jar is the right jar (remove antlr)

user650839
  • 2,594
  • 1
  • 13
  • 9
  • Hi thanks for the direction. But now it is giving different errors: 1. StatusListener listener = new twitter4j.StatusListener() - Error Status listner not set. 2. twitterStream.addListener(listener); - The method addlistner() is undefined for twitter stream. I'm using twitter4j-2.2.4.jar. Appreciate your help on this. Thanks – Zelig Apr 25 '13 at 10:34