: Oh.I'v tried run tomcat with the precompiled solr.war.When visit
: http://localhost:8080/solr/admin/ always show the page:

: root cause
:
: java.lang.NoClassDefFoundError
:       org.apache.jsp.admin.index_jsp._jspService(index_jsp.java:67)

...did you look at the tomcat logs directory to see if there were any
errors when the server tried to start itself?

I'm guessing the problem is that on startup it couldn't find your
solrconfig.xml file (or your schema.xml) so the core classes couldn't be
initialized, so when you tried to load the page those classes can't be
found.  Where do you have your config files?  is there a "solr/" directory
in the current working directory when you start the server, or are you
setting the solr.solr.home system property, or using the recently added
(but not yet well documented) jndi options for specifying solr.home?


using the following steps, i was able to start up solr server using the
example configs (copied into my current working directory) and access it
at http://localhost:8080/solr/admin/ ...

laptop:~/tmp> mkdir solr-tomcat
laptop:~/tmp> cd solr-tomcat/
laptop:~/tmp/solr-tomcat> wget 
http://www.ibiblio.org/pub/mirrors/apache/tomcat/tomcat-5/v5.5.17/bin/apache-tomcat-5.5.17.zip
 > & /dev/null
laptop:~/tmp/solr-tomcat> wget 
http://people.apache.org/dist/lucene/solr/nightly/solr-2006-05-29.zip > & 
/dev/null
laptop:~/tmp/solr-tomcat> unzip apache-tomcat-5.5.17.zip > & /dev/null
laptop:~/tmp/solr-tomcat> unzip solr-2006-05-29.zip > & /dev/null
laptop:~/tmp/solr-tomcat> cp solr-nightly/dist/solr-nightly.war 
apache-tomcat-5.5.17/webapps/solr.war
laptop:~/tmp/solr-tomcat> cp -r solr-nightly/example/solr .
laptop:~/tmp/solr-tomcat> chmod a+x apache-tomcat-5.5.17/bin/*
laptop:~/tmp/solr-tomcat> ./apache-tomcat-5.5.17/bin/startup.sh > & /dev/null


...if it can't find your configs, you'll see some really obvious
exceptions in tomcats "localhost" log that look like this...

SEVERE: StandardWrapper.Throwable
java.lang.ExceptionInInitializerError
        at 
org.apache.solr.update.SolrIndexConfig.<clinit>(SolrIndexConfig.java:35)
        at org.apache.solr.core.SolrCore.<clinit>(SolrCore.java:77)
...
Caused by: java.lang.RuntimeException: Error in solrconfig.xml
        at org.apache.solr.core.SolrConfig.<clinit>(SolrConfig.java:76)
        ... 30 more
Caused by: java.lang.RuntimeException: Can't find resource 'solrconfig.xml' in 
classpath or 'solr/conf/', cwd=/home/hossman/tmp/solr-tomcat
...
SEVERE: Servlet /solr threw load() exception
java.lang.ExceptionInInitializerError




-Hoss

Reply via email to