[ 
https://issues.apache.org/jira/browse/SOLR-14236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17029274#comment-17029274
 ] 

Shawn Heisey commented on SOLR-14236:
-------------------------------------

Solr 4.10.1 has been unsupported for a VERY long time.  Current versions are 
8.x, so 8.x is fully supported, and there is some limited support for the 
latest 7.x version.

Additionally, we do not support running Solr in Tomcat.  I haven't heard of 
being able to *build* Solr in Tomcat before.  Solr is currently built by ant.

---

The jars that you mentioned are used by Solr for logging.  Solr itself uses 
slf4j for logging, which is a framework that allows the final logging 
destination to be decided when the complete application is assembled.  Some of 
Solr's dependencies directly use JDK logging, Apache Commons Logging, and log4j.

The finished Solr package that is part of the download uses log4j as the final 
logging destination ... so jars are required to capture logs from JDK logging 
and Apache Commons Logging and inject them into slf4j.

If you want to run any version of Solr in Tomcat, you should download Solr and 
place the completed binary webapp into Tomcat.  You will need to deal with the 
logging jars yourself.  The installation of Jetty that is in the download is 
set up to use log4j 1.x as the final destination as of version 4.3, and log4j 
2.x as of version 7.4.

[https://cwiki.apache.org/confluence/display/SOLR/WhyNoWar]

> 【solr】 A "org.apache.log4j.ConsoleAppender" object is not assignable to a 
> "org.apache.log4j.Appender" variable.
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-14236
>                 URL: https://issues.apache.org/jira/browse/SOLR-14236
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Server, SolrJ
>    Affects Versions: 4.10.1
>            Reporter: Jenny Qiu
>            Priority: Minor
>              Labels: solr, tomcat
>         Attachments: 微信截图_20200203224606.png
>
>
>  
> I have built the solr project through tomcat, but when I run the startup.bat 
> it tells me this: 
> {code:java}
> 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
> {code}
> 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 {color:#FF0000}same{color} ones in 
> _D:\FSP_20160630\apache-tomcat-8_0_9-solr4_10_1\lib_
> _!微信截图_20200203224606.png!_
> But I need to mention that i have also deleted the other 3 files, or I will 
> get another error:
>  
> {code:java}
> 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 ...{code}
>  
> 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!
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to