Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-14236

【solr】 A "org.apache.log4j.ConsoleAppender" object is not assignable to a "org.apache.log4j.Appender" variable.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.10.1
    • None
    • Server, SolrJ

    Description

       

      I have built the solr project through tomcat, but when I run the startup.bat it tells me this: 

      log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
      log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
      log4j:ERROR [org.powermock.core.classloader.MockClassLoader@16a40b2] whereas object of type
      

      I searched for many solutions online, but none works.

       

      Then I thought maybe things went wrong with the files related to log4j, then I deleted the log4j-1.2.17.jar in D:\FSP_20160630\apache-tomcat-8_0_9-solr4_10_1\webapps\solr\WEB-INF\lib because I can find exact same ones in D:\FSP_20160630\apache-tomcat-8_0_9-solr4_10_1\lib

      But I need to mention that i have also deleted the other 3 files, or I will get another error:

       

      ContextListenerjava.lang.LinkageError: loader constraint violation: when resolving method
      "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" the class loader 'org.apache.catalina.loader.WebappClassLoader@4d1cc3c3 (urls: ['], parents: [)'java.net.URLClassLoader@4fccd51b']) of the current class, org/slf4j/LoggerFactory, and the class loader ...

       

      In conclusion, I have deleted all these 4 files, then the startup.bat can run properly.

      I don't know whether things will go south in the future...Are these files useful in the solr\WEB-INF\lib? Can they be deleted like this?

      Hope I can get some instructions, thx for your time!

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            Jenny Qiu Jenny Qiu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: