• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory  RSS feed

 
Ranch Hand
Posts: 1174
3
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am using NetBeans, and I get his error



I have downloaded slf4j-1.7.13.zip it si a folder when I add it as a folder to the libraries of Netbeans it is not recognized then I just went insede the folder and I added slf4j-jcl-1.7.13.jar and I still get the error:


Any idea, please?

Regards, Isaac
 
Marshal
Posts: 60829
190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please start by showing us how you are adding that jar to your classpath.
 
Isaac Ferguson
Ranch Hand
Posts: 1174
3
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java application->Libreries->rigth click->Add jar
 
Campbell Ritchie
Marshal
Posts: 60829
190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So you are using Eclipse? Please inspect that .jar file and confirm the appropriate .class file is inside it.
 
Isaac Ferguson
Ranch Hand
Posts: 1174
3
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Netbeans
 
Campbell Ritchie
Marshal
Posts: 60829
190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And is that .class file actually in that .jar?
 
Master Rancher
Posts: 3675
40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are there more jar files in that zip file?

There should be...you seem to have not added the api one, which is the core.
 
Isaac Ferguson
Ranch Hand
Posts: 1174
3
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are plenty of files here http://slf4j.org/download.html

When I add all of them I get this:



Any idea, please?

Regards, Isaac
 
Dave Tolls
Master Rancher
Posts: 3675
40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't just throw things at the wall and hope?

As the user manual for SL4J says, you need the API and a binding.
You've added every binding under the sun, by the looks of it.

The HelloWorld example on that page uses just the API jar and the 'simple' binding.
 
Isaac Ferguson
Ranch Hand
Posts: 1174
3
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
True I deleted a jar was which not needed and now it works.
 
Campbell Ritchie
Marshal
Posts: 60829
190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What was in the .jar you deleted? Was there a package structure similar to that for the logger factory class?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!