Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

java - How to fix exception: Failed to instantiate SLF4J LoggerFactory?

I am trying to write a java web crawler for semantic web using jena library. I have build project using Netbeans. I am receiving two errors:

  1. Failed to instantiate SLF4J LoggerFactory Reported exception: java.lang.NoClassDefFoundError: org/apache/log4j/Level

  2. Could not initialize class com.hp.hpl.jena.rdf.model.impl.ModelCom at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128)

I have included slf4j-api and slf4j-log both libraries.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You should also include log4j library as slf4j-log4j is just a static binder.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...