mvogiatzis / first-stories-twitter

How to spot first stories on Twitter using Storm.
MIT License
124 stars 32 forks source link

java.lang.NullPointerException #5

Closed wonderer007 closed 7 years ago

wonderer007 commented 7 years ago

I run mvn compile exec:java -Dexec.classpathScope=compile -Dexec.mainClass=crawler.Crawler

at project root and got this error

[WARNING] java.lang.NullPointerException at java.util.Properties$LineReader.readLine(Properties.java:434) at java.util.Properties.load0(Properties.java:353) at java.util.Properties.load(Properties.java:341) at crawler.Crawler.main(Crawler.java:100) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:282) at java.lang.Thread.run(Thread.java:748) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 08:39 min [INFO] Finished at: 2017-05-22T14:53:26+05:00 [INFO] Final Memory: 24M/143M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project First-Story-Detection: An exception occured while executing the Java class. null: NullPointerException -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

mvogiatzis commented 7 years ago

This is because you have not created your twitter4j credentials correctly. You need to fill in the twitter4j.properties file with your own credentials. Please read https://github.com/mvogiatzis/first-stories-twitter#how-to-run

Also you don't have to run the crawler, since a tweets.txt file is already provided