• 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
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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

 
Ranch Hand
Posts: 1299
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: 62819
203
  • 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.
 
Angus Ferguson
Ranch Hand
Posts: 1299
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: 62819
203
  • 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.
 
Angus Ferguson
Ranch Hand
Posts: 1299
3
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Netbeans
 
Campbell Ritchie
Marshal
Posts: 62819
203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And is that .class file actually in that .jar?
 
Master Rancher
Posts: 3887
45
  • 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.
 
Angus Ferguson
Ranch Hand
Posts: 1299
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: 3887
45
  • 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.
 
Angus Ferguson
Ranch Hand
Posts: 1299
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: 62819
203
  • 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?
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!