Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

SEVERE: Error filterStart

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Trying to get Solr running on Tomcat. Would somebody clue me in on why I'm getting this err msg?

Err msg from catalina.out

INFO: Deploying configuration descriptor /usr/share/tomcat/conf/Catalina/localhost/solr.xml
Oct 10, 2013 5:46:29 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error filterStart
Oct 10, 2013 5:46:29 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/solr] startup failed due to previous errors

solr.xml file:

<?xml version="1.0" encoding="utf-8"?>
<Context docBase="/usr/share/solr-4.5.0/example/solr/solr.war" crossContext="true">
<Environment name="solr/home" type="java.lang.String" value="/usr/share/solr-4.5.0/example/solr" override="true" />
</Context>


Snip from Tomcat startup script:

JAVA_HOME="/usr/lib/jvm/java-7-oracle"
JAVA_OPTS="-Xms128M -Xmx128M";
TOMCAT_USER=tomcat;
TOMCAT_PATH=/usr/share/tomcat;
SHUTDOWN_TIME=30
###### Tomcat start/stop script ######

export JAVA_HOME
export JAVA_OPTS


xxx@xxxx:/usr/share/solr-4.5.0/example/solr# ls 'note solr.war file is in this directory.
bin collection1 README.txt solr.war solr.xml.bakup zoo.cfg
xxx@xxxx:/usr/share/solr-4.5.0/example/solr#
 
Jim Armstrong
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's the solution.
I also had to change the permissions, owner, and group for log4j.properties after copying it into /usr/share/tomcat/lib.

http://wiki.apache.org/solr/SolrLogging

Using the example logging setup in containers other than Jetty

To get the same logging setup in another container (Tomcat for example) as with the example Jetty server, you need to do the following

Copy the jars from solr/example/lib/ext into your container's main lib directory. These jars will set up SLF4J and log4j.

Exactly where this lib directory is highly variable. For a Debian or Ubuntu server using the Tomcat package available from the OS vendor, this is likely to be /usr/share/tomcat6/lib or /usr/share/tomcat7/lib.

Copy the logging config from solr/example/resources/log4j.properties into a location on the classpath. Usually you can use the same location as the jar files above. Edit the configuration file for your preferred log destination.

Optionally, if you did not place log4j.properties on the classpath, set java option -Dlog4j.configuration=file:///path/to/log4j.properties

If the system can not find the jars for logging, you may get an error which prevents Solr from deploying. For instance in Tomcat 6, it might look like this:

INFO: Deploying web application archive solr.war
May 29, 2013 3:59:40 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
May 29, 2013 3:59:40 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/solr] startup failed due to previous errors

If the system cannot find your logging configuration, you may get errors like this:

log4j:WARN No appenders could be found for logger (org.apache.solr.servlet.SolrDispatchFilter).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

It might help to start the server with -Dlog4j.debug=true to see more details.
 
Yup, yup, yup. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!