Error running embedded tomcat with gradle – NoClassDef found for org.slf4j.spi.LoggerFactoryBinder

Problem

trying to run an embedded tomcat with the gradle tomcat plugin (https://github.com/bmuschko/gradle-tomcat-plugin)

gradle tomcatRun

but getting the following error:

Caused by: java.lang.ClassNotFoundException: org.slf4j.spi.LoggerFactoryBinder

Solution

likely your gradle is too new.

To resolve the issue, run with an older version of gradle using gradle wrapper.

generate gradle wrapper for your project

gradle wrapper --gradle-version 2.3

then run with

gradlew tomcatRun

 

Tested with

  • installed gradle 2.11
  • gradle wrapper 2.3
  • tomcat 7.0.11
  • windows
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s