Problem to integrate Solr in Jetty (the first example in the Apache Solr 3.1 Cookbook)
Hi, I'm using Apache Solr 3.5.0 and Jetty 8.1.2 with Windows 7. (Versions in the Book used... Solr 3.1, Jetty 6.1.26) I've tried to get Solr running with Jetty. - I copied the jetty.xml and the webdefault.xml from the example Solr. - I copied the solr.war to webapps - I copied the solr directory from the example dir to the jetty dir. When I try to start I get this error message: C:\\jetty-solrjava -jar start.jar java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.jetty.start.Main.invokeMain(Main.java:457) at org.eclipse.jetty.start.Main.start(Main.java:602) at org.eclipse.jetty.start.Main.main(Main.java:82) Caused by: java.lang.ClassNotFoundException: org.mortbay.jetty.Server at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at org.eclipse.jetty.util.Loader.loadClass(Loader.java:92) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.nodeClass(XmlConfiguration.java:349) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:327) at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:291) at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1203) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1138) ... 7 more Usage: java -jar start.jar [options] [properties] [configs] java -jar start.jar --help # for more information Thanks for your help, Bastian
Re: Problem to integrate Solr in Jetty (the first example in the Apache Solr 3.1 Cookbook)
Thanks Shawn, I think I'll stay with the build in. I had problems with Solr Cell, but I could fix it. Greetings, Bastian Am 12. April 2012 18:02 schrieb Shawn Heisey s...@elyograg.org: Bastian, The jetty.xml included with Solr is littered with org.mortbay class references, which are appropriate for Jetty 6. Jetty 7 and 8 use the org.eclipse prefix, and from the very small amount of investigation I did a few weeks ago, have also made other changes to the package names, so you might not be able to simply replace org.mortbay with org.eclipse. The absolutely easiest option would be to just use the jetty included with Solr, not version 8. If you want to keep using Jetty 8, you will need to find/make a new jetty.xml file. If I were set on using Jetty 8 and had to make it work, I would check out trunk (Lucene/Solr 4.0) from the Apache SVN server, find the example jetty.xml there, and use it instead. It's possible that you may need to still make changes, but that is probably the path of least resistance. The jetty version has been upgraded in trunk. Another option would be to download Jetty 6, find its jetty.xml, and compare it with the one in Solr, to find out what the Lucene developers changed from default. Then you would have to take the default jetty.xml from Jetty 8 and make similar changes to make a new config. Apparently Jetty 8 no longer supports JSP with the JRE, so you're probably going to need the JDK. The developers have eliminated JSP from trunk, so it will still work with the JRE. Thanks, Shawn