2016-10-14 6 views
0

に、私はその後、私は私の中でcore/target/x-jar-with-dependencies.jarで作成された脂肪のjarを使用していますここhttps://gist.github.com/titipata/13fad88df5525d607f24java.lang.NoClassDefFoundErrorが火花提出

から

MAVEN_OPTS="-Xmx2g -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=512m" mvn package -DskipTests=true

を使用して、ここhttps://github.com/tribbloid/spookystuff/tree/branch-0.4からプロジェクトを構築しました別のプロジェクトを所有している

<dependency> 
    <groupId>com.tribbloid.spookystuff</groupId> 
    <artifactId>spookystuff-core_2.10</artifactId> 
    <scope>system</scope> 
    <version>0.4.0-SNAPSHOT</version> 
    <systemPath>${basedir}/lib/x-jar-with-dependencies.jar</systemPath> 
</dependency> 

そしてまた、私は(y-jar-with-dependencies.jarは言うことができます)にspookystuffを使用しているこのプロジェクトの脂肪-jarファイルを作成しています。今

spark-submit --class org.webcrawler.core.Driver --master local[*] /path/to/my/y-jar-with-dependencies.jar

を実行している私はというエラーを取得

Exception in thread "main" java.lang.NoClassDefFoundError: com/tribbloids/spookystuff/actions/Action

調査:

jar -tvf /path/to/my/x-jar-with-dependencies.jar | grep "com/tribbloids/spookystuff/actions/Action"

私は結果を得るが、

jar -tvf /path/to/my/y-jar-with-dependencies.jar | grep "com/tribbloids/spookystuff/actions/Action"

クラスが見つかりません。この中で私はどこで間違っていますか?

+0

あなたの '-y-jar'はそのクラスを持っていません。どのように' y-jar'を依存関係で構築していますか? – Shankar

+0

私は 'maven-assembly-plugin'プラグインを使ってfat-jarを作成しています。 –

+0

https://gist.github.com/fahadsiddiqui/cbe4c85e75568961696604ccce211bb0#file-pom-xmlを見てください –

答えて

関連する問題