Try following the steps outlined in Using the example logging setup in containers other than Jetty. I have encountered this same error when running Solr 4.3 until I followed these steps to configure logging.
Solr 4 Data Import Handler doesn't work
-
01-06-2022 - |
質問
I am deploying Solr 4.3.0 in Tomcat 7. Everything works fine but DataImportHandler. I can go to the
http://localhost:8080/solr/#/collection1/dataimport//dataimport
screen and see the dataimport options load at the UI.
Still, I can see any of my entities load in the "entity" combo box. Inside the configuration box, at the right side I can see the error below.
Apache Tomcat/7.0.41 - Error report
525D76;}--> HTTP Status 500 - Filter execution threw an exception
noshade="noshade">
type Exception report
message Filter execution threw an exception
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Filter execution threw an exceptionroot cause
java.lang.NoClassDefFoundError: org/apache/log4j/spi/LoggingEvent org.apache.solr.logging.log4j.EventAppender.append(EventAppender.java:35) org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251) org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66) org.apache.log4j.Category.callAppenders(Category.java:206) org.apache.log4j.Category.forcedLog(Category.java:391) org.apache.log4j.Category.log(Category.java:856) org.slf4j.impl.Log4jLoggerAdapter.error(Log4jLoggerAdapter.java:498) org.apache.solr.common.SolrException.log(SolrException.java:119) org.apache.solr.servlet.ResponseUtils.getErrorInfo(ResponseUtils.java:58) org.apache.solr.servlet.SolrDispatchFilter.sendError(SolrDispatchFilter.java:691) org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:380) org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:155)note The full stack trace of the root cause is available in the Apache Tomcat/7.0.41 logs.
Apache Tomcat/7.0.41
Problem is that I have the "log4j-1.2.16.jar" loaded in the classpath (it's on Tomcat lib dir).
Anyone have stepped in this problem?
解決
他のヒント
After changing the directory, did you change the directory path in solrconfig.xml file.
I just want to make sure after the making changes in configuration file, did you restart the tomcat and solr server?
You need to copy the slf4j-log4j12-1.6.6.jar
from the ext
of Solr
into the lib
folder.
You also need to put the logging.properties file there.