I have
compile 'org.slf4j:slf4j-jdk14:1.0'
in my dependencies, still getting
Caused by: java.lang.NoClassDefFoundError: org/slf4j/spi/LoggerFactoryBinder
when running
gradle clean tomcatRun
what is wrong with this tomcat class loader?
I have
compile 'org.slf4j:slf4j-jdk14:1.0'
in my dependencies, still getting
Caused by: java.lang.NoClassDefFoundError: org/slf4j/spi/LoggerFactoryBinder
when running
gradle clean tomcatRun
what is wrong with this tomcat class loader?
Has your tomcatRun task got a classpath from compile?
configurations{
tomcatRun
}
dependecies{
compile 'org.slf4j:slf4j-jdk14:1.0'
tomcatRun configurations.compile
}
tomcatRun{
classpath = configurations.tomcatRun
}
I don't know if it will work for you with tomcatRun, but for tomcastJasper, I added dependencies to the tomcat configuration where you set the tomcat version information:
dependencies {
def tomcatVersion = '8.0.42'
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
"org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}",
"org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}",
"javax.servlet:jstl:1.2"
}