2016-05-15 18 views
0

次の問題を解決すると、不一致の署名者に関するエラーが発生します。以下を参照してください:私がしようとすると、依存関係、実行compile 'org.apache.spark:spark-core_2.11:1.4.0'を追加せずに構築する場合スプリングブートとApache Sparkのセキュリティ例外:署名者の不一致

buildscript { 
    ext { 
     springBootVersion = '1.3.3.RELEASE' 
    } 
    repositories { 
     mavenCentral() 
    } 
    dependencies { 
     classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") 
    } 
} 

apply plugin: 'java' 
apply plugin: 'idea' 
apply plugin: 'eclipse' 
apply plugin: 'spring-boot' 

jar { 
    baseName = 'appTest' 
    version = '1.0.0' 
} 
sourceCompatibility = 1.8 
targetCompatibility = 1.8 

repositories { 
    mavenCentral() 
} 


dependencies { 
    compile('org.springframework.boot:spring-boot-starter-web') 

    //compile 'org.apache.spark:spark-core_2.11:1.4.0' //problem here 

    compile("org.springframework.boot:spring-boot-starter-data-jpa") 
    compile("com.h2database:h2") 
    compile('mysql:mysql-connector-java') 

    testCompile("junit:junit") 
    testCompile('org.springframework.boot:spring-boot-starter-test') 
    testCompile("junit:junit") 
} 

task wrapper(type: Wrapper) { 
    gradleVersion = '2.9' 
} 

はここに私の元のGradleのビルドファイルです。私は試してみて、その依存関係とそれを実行した場合しかし、私が取得:

FAILURE: Build failed with an exception. 
SLF4J: Class path contains multiple SLF4J bindings. 

SLF4J: Found binding in [jar:file:/C:/Users/xxx/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-log4j12/1.7.16/54c6dd23a7c420e40b8848e962d5f2a3534260af/slf4j-log4j12-1.7.16.jar!/org/slf4j/impl/StaticLoggerBinder.class] 

SLF4J: Found binding in [jar:file:/C:/Users/xxx/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.1.5/92353eb144695bba80b31f7bec4f36d871f230ac/logback-classic-1.1.5.jar!/org/slf4j/impl/StaticLoggerBinder.class] 

研究し、私はthisを見つけました。私はその後、(ちょうど私のGradleビルドファイル内jar{...}私以上)の下に追加してslf4j-log4j12を除外しようとした:実際に構築し

configurations.all { 
    exclude module: 'slf4j-log4j12' 
} 

を。私は、これは別の署名を持っているものを用い、複数の瓶のあることに起因していると仮定し

Caused by: java.lang.SecurityException: class "javax.servlet.http.HttpSessionIdListener"'s signer information does not match signer information of other classes in the same package 

:私がしようとすると​​を経由して、それを実行したときしかし、私は別のエラーを取得しますか?これをどうすれば解決できますか?助けてください!完全なエラーのために

view here.

答えて

0

[OK]を、私はそれを解決しているかもしれないと思います。私はさらにいくつかのテストを実行する必要があります。

調査では、火花はto run on Jettyで、Tomcatでは設定されていないようです。ログファイルを見ると、Jettyと連携しようとしていたことがわかりました。

私は依存関係を調べて、org.eclipse.jetty.orbitを見つけました。私は除外することができましたconfigurations.all

exclude module: 'javax.servlet' 
関連する問題