Java Intro to Java Web Development with Spark Diving into Web Development Meet Spark

Sandeep Annapareddy
Sandeep Annapareddy
3,140 Points

Error running the project

Hi, when I tried to run the project, I have been getting the following errors:

"C:\Program Files\Java\jdk1.8.0_65\bin\java" "-javaagent:C:\Program SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

Please let me know how I can fix them. Thanks

Yanuar Prakoso
Yanuar Prakoso
14,816 Points

what version of Spark do you use?

4 Answers

Yanuar Prakoso
Yanuar Prakoso
14,816 Points

please try to change it to version 2.3 (the same version as Craig)

compile "com.sparkjava:spark-core:2.3"

then restart all processes

Fathima Fas-ha
Fathima Fas-ha
6,847 Points

I also had the same error, I had imported in the Main class

java
import static spark.route.HttpMethod.get;

instead of

java
import static spark.Spark.get;

check whether you have imported the correct one!! :)

Kareem Jeiroudi
Kareem Jeiroudi
14,981 Points

I was getting the same message. There are two possibilities: either import the same version that Craig used,

compile 'com.sparkjava:spark-core:2.3'

or look up this StackOverflow post

Alec Meyer
Alec Meyer
6,301 Points
compile 'org.slf4j.slf4j-simple:1.7.21'

Add that to your build.gradle