2017-01-26 12 views
0

로컬 모드에서 간단한 단어 개수 토폴로지를 실행 중입니다. Intellij IDE로 토폴로지를 실행하면 모든 것이 완벽하게 작동하고 문자열에서 단어 수가 계산됩니다. 그러나 토폴로지를 실행할 때스톰 예제 오류

A JNI error has occurred, please check your installation and try again 
Exception in thread "main" java.lang.NoClassDefFoundError: backtype/storm/topology/IRichSpout 
at java.lang.Class.getDeclaredMethods0(Native Method) 
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) 
at java.lang.Class.privateGetMethodRecursive(Class.java:3048) 
at java.lang.Class.getMethod0(Class.java:3018) 
at java.lang.Class.getMethod0(Class.java:3018) 
at java.lang.Class.getMethod(Class.java:1784) 
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544) 

내가 적절한 files.Any 아이디어에있는 동안 명령의 MVN 패키지와 폭풍 항아리 대상/단어 수-1.0-SNAPSHOT.jar com.microsoft.example.WordCountTopology을 사용 : 맥의 터미널에서 나는 오류가?

답변

0

STORM_HOME으로 설정해야합니다. 필요한 항아리를 찾을 수 없습니다. 이는 $STORM_HOME/lib이어야합니다.

storm-core 종속성을 pom.xml에 지정하고 <scope>compile</scope>으로 설정하여 멀리 항아리를 만들 수 있습니다.