Solving one problem led to the next, now I am getting an error about a mismatching signer. Please see below:
Here is my original gradle build file:
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'
}
If I try and build without adding the dependency compile 'org.apache.spark:spark-core_2.11:1.4.0'
it runs. however, if I try and run it with that dependency I get:
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]
Researching, I found this. I then tried to exclude slf4j-log4j12
by adding below (just above my jar{...}
in my gradle build file):
configurations.all {
exclude module: 'slf4j-log4j12'
}
Which actually builds. However, when I try and run it via bootRun
I get another error:
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
I assume this is due to multiple jar's being used which have different signatures? How do I solve this? Please help!
For full error, view here.