java - Gradle + Tomcat plugin + slf4j -


i'm using apply plugin: 'com.bmuschko.tomcat' tomcat deployments, use maven time change gradle, after several tries using intellijidea ide, i'm not able run tomcatrun task, there weird error saying.

failed instantiate slf4j loggerfactory reported exception: java.lang.noclassdeffounderror: org/slf4j/spi/loggerfactorybinder     @ java.lang.classloader.defineclass1(native method) .... .... caused by: java.lang.illegalstateexception: org.slf4j.loggerfactory not initialized. @ org.slf4j.loggerfactory.getiloggerfactory(loggerfactory.java:354) @ org.slf4j.loggerfactory.getlogger(loggerfactory.java:294) 

i have config in gradle.build

   log4jversion = '1.2.17'    slf4jversion = '1.7.12'    compile "log4j:log4j:$log4jversion"    compile "org.slf4j:slf4j-log4j12:$slf4jversion" 

i'm using gradle , run gradle tomcatrun , same happens, gradle version tried 2.6 , 2.10 same results.

seems war file being created correctly libs on it, using plugin , gradle makes strange combination, highlight here ? other question if there plugin gradle-tomcat elsewhere?

forgot add, i'm using tomcatversion = '6.0.44' , java7

i had same problem , resolved using gradle wrapper, gradle verison 2.3. see https://docs.gradle.org/current/userguide/gradle_wrapper.html

add gradle wrapper

gradle wrapper --gradle-version 2.3 

then run tomcat with

gradlew tomcatrun 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -