runfriends / GettingStartedWithStorm-cn

翻译Getting Started with Storm
42 stars 26 forks source link

运行了第一个demo程序 但是报错 #1

Open tianzongqi opened 8 years ago

tianzongqi commented 8 years ago

报错信息如下:

365 [Thread-11] ERROR backtype.storm.event - Error when processing event backtype.storm.daemon.supervisor$fn__3567$exec_fn__945__auto____3568$this__3668@5f775831 java.io.FileNotFoundException: Source 'file:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/lib/ant-javafx.jar!/resources' does not exist at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:866) at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:770) at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:745) at backtype.storm.daemon.supervisor$fn__3785.invoke(supervisor.clj:394) at clojure.lang.MultiFn.invoke(MultiFn.java:171) at backtype.storm.daemon.supervisor$fn__3567$exec_fn__945__auto____3568$this__3668.invoke(supervisor.clj:263) at backtype.storm.event$event_manager$fn__2068$fn__2069.invoke(event.clj:25) at backtype.storm.event$event_manager$fn__2068.invoke(event.clj:22) at clojure.lang.AFn.run(AFn.java:24) at java.lang.Thread.run(Thread.java:745)

请问这是因为啥啊?

tobyustb commented 8 years ago

我的也报错 D:\code\storm\storm-book-examples-ch02-getting_started-8e42636\storm-book-examples-ch02-getting_started-8e42636>mvn exec:java -Dexec.ma inClass="TopologyMain" -Dexec.args="src/main/resources/words.txt [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Getting-Started 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- exec-maven-plugin:1.5.0:java (default-cli) @ Getting-Started --- [WARNING] java.lang.ClassNotFoundException: TopologyMain at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:281) at java.lang.Thread.run(Thread.java:745) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.650 s [INFO] Finished at: 2016-08-26T12:39:36+08:00 [INFO] Final Memory: 12M/217M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.5.0:java (default-cli) on project Getting-Started: An exception oc cured while executing the Java class. TopologyMain -> [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

Weilor commented 7 years ago

问题解决,如下:

先不要执行 mvn exec:java -Dexec.mainClass="TopologyMain" -Dexec.args="src/main/resources/words.txt" 先执行 mvn -f pom.xml clean install 此时注意,这个工程里面的代码是有错误的,大概有三处,改正后就能编译通过了 install通过后再执行 mvn exec:java -Dexec.mainClass="TopologyMain" -Dexec.args="src/main/resources/words.txt"