How to fix exception: Failed to instantiate SLF4J LoggerFactory?

后端 未结 4 871
生来不讨喜
生来不讨喜 2020-12-09 22:57

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 insta

相关标签:
4条回答
  • 2020-12-09 23:41

    I tried all permutation and combination but finally slf4j-api- and slf4j-simple- worked well.

    0 讨论(0)
  • 2020-12-09 23:56

    You should include slf4j-api-x.x.x.jar and slf4j-simple-x.x.x.jar in your classpath.

    0 讨论(0)
  • 2020-12-09 23:58

    As error suggested:

    Failed to instantiate SLF4J LoggerFactory

    you need to place your corresponding slf4j-*-*.jar binding files into your classpath folder.

    You can locate them by locate slf4j if present.

    As of SLF4J version 1.6.0, if no binding is found on the class path, then slf4j-api will default to a no-operation implementation discarding all log requests.

    Tomcat

    If using Tomcat, these files you can copy either into /usr/share/tomcat7/lib or your webapp folder /var/lib/tomcat7/webapps/*/WEB-INF/lib.

    Solr

    If you're using Solr or you want use the files from there (which are included by default), you can find them in dist/solrj-lib and example/lib/ext.


    See: The Simple Logging Facade for Java (SLF4J) user manual

    0 讨论(0)
  • 2020-12-09 23:59

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

    0 讨论(0)
提交回复
热议问题