Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Apache Solr would not start. Keeps throwing the following error

    java -jar example/start.jar 

    java.lang.ClassNotFoundException: org.mortbay.xml.XmlConfiguration
            at Method)
            at java.lang.ClassLoader.loadClass(
            at java.lang.ClassLoader.loadClass(
            at org.mortbay.start.Main.invokeMain(
            at org.mortbay.start.Main.start(
            at org.mortbay.start.Main.start(
            at org.mortbay.start.Main.main(
share|improve this question

When you're not inside the example dir, you need to specify the path for jetty.home. It may also be a good idea to set the jetty.logs option as well:

java -Djetty.home=example -Djetty.logs=/tmp -Dsolr.solr.home=example/solr -jar example/start.jar 
share|improve this answer

Specify the classpath to solr files with -cp

java -cp <path> -jar example/start.jar 
share|improve this answer
For me it also worked when I did cd /path/to/example and then invoked solr. – Nifle May 26 '11 at 6:41
This hasn't worked for me. Probably because when the -jar option is used, the -cp option is ignored. Quote from the Java manual for the -jar option: "When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored." – chiborg Jan 10 '12 at 10:53
Yes. This is true, You should add the dependencies on your jar Manifest. – Sacx Jan 12 '12 at 7:46

Make sure that you've met the requirements:

type: cd /opt/apache-solr-1.3.0/example type: java -jar start.jar

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.