Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSandeep Annapareddy
3,141 PointsError 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
5 Answers
Sandeep Annapareddy
3,141 PointsYanuar Prakoso version: 2.7.1
Yanuar Prakoso
15,196 Pointsplease try to change it to version 2.3 (the same version as Craig)
compile "com.sparkjava:spark-core:2.3"
then restart all processes
Kareem Jeiroudi
14,984 PointsI 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
Fathima Fas-ha
6,847 PointsI 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!! :)
Alec Meyer
6,303 Pointscompile 'org.slf4j.slf4j-simple:1.7.21'
Add that to your build.gradle
Tonnie Fanadez
UX Design Techdegree Graduate 22,796 PointsIf you're here in Oct. 2019 these 3 lines of code might save you.
compile 'com.sparkjava:spark-core:2.9.1'
compile 'org.slf4j:slf4j-api:2.0.0-alpha1'
compile 'org.slf4j:slf4j-simple:2.0.0-alpha1'
Cheers
Yanuar Prakoso
15,196 PointsYanuar Prakoso
15,196 Pointswhat version of Spark do you use?