You will need:
- Eclipse (http://www.eclipse.org). I am using Eclipse 3.4 but this should also work just fine in Eclipse 3.5.
- RunJettyRun plugin (http://code.google.com/p/run-jetty-run/wiki/GettingStarted)
- Apache Solr (Any version should suffice. I am using 1.4.)
Download and extract both Eclipse and Apache Solr tar files somewhere on your disk. Since Solr has some XML configuration files, I would also suggest installing the Eclipse WTP (Web Toolkit Platform) that gives you some good built-in XML editors.
Follow the Getting Started guide in the RunJettyRun wiki to install the plugin. It should be pretty fast and easy.
Step Two: Create your Java project
Create a standard Java project in Eclipse (File..New..Java Project). Call it what you wish (I called it "TestSolr"). The default options should be fine and click through the wizard to see all the options or click Finish at your first chance to get done faster.
Here you should see your TestProject in your workspace with a blank src folder.
Step Three: Setup the Solr webapp in your Eclipse project.
This is where the RunJettyRun plugin installed earlier gets used. This plugin allows you to develop, run and debug web applications inside Eclipse allowing you to take advantage of Eclipse's powerful code editing and debugging capabilities. It's also one of the simpler web application development plugins available. Eclipse supports full blown web development but for the purposes of this tutorial and developing needs, this plugin is more than enough.
- Inside the TestSolr directory, create a folder called "webapp". Do this by right clicking on the "TestSolr" in the workspace, select "New" and then "Folder".
- At a command prompt, unjar the apache-solr-1.4.0.war in this webapp folder. In Windows, this would be done by the following command:
jar -xvf c:\applications\apache-solr-1.4.0\dist\apache-solr-1.4.0.war
The contents of the war file should be in the webapp folder. To confirm, right click on the "TestSolr" folder in the Eclipse workspace and select "Refresh." - Add all the jar files in the webapp/WEB-INF/lib to the Build Path. This is done by selecting all the jars and right click on any of the jars (while all are selected), select the "Build Path" sub-menu and select "Add to Build Path"
- Setup a solr home folder inside your project. For purposes of this tutorial, copy the "solr" folder from the "example/" folder in the directory containing solr into the "TestSolr" folder in your Eclipse workspace. By now, your "TestSolr" project layout should look something like this.
Now that you have setup your project, it's time to create a run configuration for Jetty and run this!
- In Eclipse, go to the Run menu and select "Run Configurations...".
- On the left rail, you should see "Jetty Webapp" as one of the run configuration types. Right click on this and select "New". The project should be "TestSolr" (if not, type in TestSolr in the text box labeled with "Project"). The name of the run configuration is populated with "TestSolr" and can be whatever you wish.
- The default HTTP port is 8080 and can be left alone if you wish. To conform to Solr tutorials (making copying/pasting links easier, change this to 8983). Delete the HTTPs port 8443 since we aren't doing any SSL access. This will disable the SSL specific fields such as the keystore/password fields.
- Change the "context" to "/solr" from "/". This is more for conformity with the solr tutorials in that all links in the wiki you to something like http://localhost:8983/solr/.
- Type in "webapp" in the "WebApp dir" text box. This is the root of the web application and is the directory above the WEB-INF folder. This is where the solr war file was extracted and hence is the equivalent of deploying the solr war in your servlet container.
Now click the "Run" button which will save the changes and the console will hopefully start spewing out logs produced by both Jetty and Solr. Open a browser to http://localhost:8080/solr/admin/ and voila! you should see the Solr admin page. In scrolling through the console, you shouldn't see any exceptions thrown.
This simple tutorial just shows the basics of setting up a simple solr installation inside Eclipse using Jetty and running inside Eclipse. Notice that we don't have any of our own code running that may do some extra things (say custom analyisis, tokenizing etc). If we did have such code, then it would naturally lie in the "src/" folder; however, we need to instruct Eclipse to compile the code so that it goes in the WEB-INF/classes folder so it will run inside Jetty. To do this:
- Right click on the TestSolr project and select "Properties".
- Click on the "Java Build Path" on the left rail
- Click on the "Source" tab and towards the bottom, change the default output folder to be "TestSolr/webapp/WEB-INF/classes".
Now you can develop your custom solr plugins directly in Eclipse and debug them immediately. Instead of running the TestSolr jetty instance, you can launch it in debug mode by going to the Run Menu and opening the "Debug Configurations.." sub-menu, selecting the Jetty configuration created earlier and click the "Debug" button. I would encourage familiarizing yourself with Eclipse's debugging capabilities for they are vast and amazing.
If you have any questions or comments, please post them and I'll do my best to answer them as quickly as possible.
Hi..,
ReplyDeleteit sounds good.
But i have problem while setup solr in Eclipse IDE.
Whiling building the solr project, i got following errors. how to fix it?
The method getTextContent() is undefined for the type Node TestConfig.java solr/src/test/org/apache/solr/core line 88 Java Problem
The method getTextContent() is undefined for the type Node TestConfig.java solr/src/test/org/apache/solr/core line 91 Java Problem
The method setXIncludeAware(boolean) is undefined for the type DocumentBuilderFactory Config.java solr/src/java/org/apache/solr/core line 105 Java Problem
The method setXIncludeAware(boolean) is undefined for the type DocumentBuilderFactory DataImporter.java solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport line 173 Java Problem
The method setXIncludeAware(boolean) is undefined for the type DocumentBuilderFactory TestXIncludeConfig.java solr/src/test/org/apache/solr/core line 32 Java Problem
I follow your tutorial to setup it. but no luck.
Please help me out?
What version of the JVM are you using in Eclipse? Also make sure that you use the JDK and not the JRE when developing.
ReplyDeleteThanks for quick reply.
ReplyDeleteI am using java version 1.6.0_17 and also i confirmed that i am using JDK for developing.
Actually above 5 errors states that some methods missing. But i can verified that exceptional methods are defined in the packages.
But i don't know why eclipse showing those errors?
Is any problem with eclipse IDE that I setup it?
Hi,
ReplyDeleteActually i have fixed those errors i early mentioned to you. Now, Jetty runs successfully. But while move on to http://localhost:8983/solr/admin/ on i am getting nothing in browser(blank white screen). I seen some errors in eclipse IDE console while move on to that url.
Errors are,
2010-01-29 15:37:10.442:org.apache.jasper.runtime.JspFactoryImpl:WARN: Exception initializing page context
java.lang.VerifyError: (class: org/apache/jasper/runtime/PageContextImpl, method: getELResolver signature: ()Ljavax/el/ELResolver;) Incompatible argument to function
at org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFactoryImpl.java:128)
at org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java:81)
at org.apache.jsp.admin.index_jsp._jspService(org.apache.jsp.admin.index_jsp:71)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:80)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
..........
..........
Please help me out
Hmm.. do you have multiple jars in the classpath that might be conflicting with each other? Can you post the .classpath file?
ReplyDeleteHi.,
ReplyDeletei got a clue from your multiple jars and fix that issue. Now its working fine. Thank you.
If i have any further queries, i will ask you.
Hi,
ReplyDeleteThanks for this wonderful tutorial. I was able to successfully modify the code (enabled wildcard search by modifying queryparser.java file) and it works fine in Eclipse. Now I am not sure how to bundle the changes and deploy it.. can you please provide the pointers for that?
Thanks,
Barani
This comment has been removed by a blog administrator.
DeleteHi Barani,
ReplyDeleteSorry for the late response. I don't get email notifications on comments and am not sure how (if at all) to set that up. Depending on your build configuration, you could simply do an export to jar in eclipse and drop that jar on your WEB-INF/lib path so long as it doesn't collide with a jar with the same classes.
Amit,
ReplyDeleteSaw you presentation last night at Hacker Dojo. was hoping to talk to you but the queue was too long :)
Anyways, did you try the above with the latest source of solr(merged under lucene). I have all types of issues with that, will look into it today and post my findings.
Would love to meet up for lunch one of these days(my treat) if possible? Don't want to wait for another Lucene/SOLR meetup :)
feel free to ping me at aboxfortheotherstuff[at]gmail[dot]com
thanks
Vish
Amit,
ReplyDeleteThanks for great article. I would like know if you can share information on how to set up solr and lucene source in new projects. And then use those project into TestSolr(webapp, as in this article). Therefore TestSolr application depends on other solr project instead of the distributed jar library as explained in the article above. I need to modify solr filters and and new custom dictionaries during analysis phase. What do you think should be best way to produce?
Hi,
ReplyDeleteI am new to Apache Solr. I have problem in installing and configuring it. I read your article. But I have problems in doing it. I am using maven with eclipse.So, I dont have to install jetty separately.
So when I opened run configuration I did not get jetty server option.
As suggested by you I made a webapp folder inside my project folder and unzipped that solr.jar file. But I did bot get any idea what to do after that. Can you please tell also what change I have to make in files Schema.xml and Solarconfig.xml
Hello,
ReplyDeletethank you for your very valuable article!
Thanks to this article, I could setup solr in eclipse and begin writing a simple response writer plugin.
However, I cannot figure how to debug. When lauching the debug configuration, eclipse doesn't stop on any breakpoint.
Any hint?
@Priya, did you install the RunJettyRun plugin I mentioned? That is where you get the run option for jetty. If you are using maven and eclipse without jetty then I am not sure.
ReplyDelete@Ben, Can you launch Solr in Eclipse using the run configuration? When you say the breakpoints aren't being hit, are these the ones in your code? If you can send screenshots or configuration files, do so to ANithian-at-gmail.com
Hi,
ReplyDeleteThanks for such a great article.
But i have a requirement of debugging the SOLR code itself, not the plugins.
When i post a document to Solr, i want to debug the solr server.
I have put breakpoints at the solr code whose jars i have used in web-inf/lib... but still they wont stop at these breakpoints.
can u let me know what i am missing?
Thanks,
Geeta
Hi Geeta,
ReplyDeleteIs your solr source code in Eclipse or elsewhere on the file system. In either case it won't matter but it's important that you attach the source to the jar file. The way you know this is in your project, select the appropriate jar file, expand and double click a concrete class. You should see the actual java source. Of course you can't edit it but you should be able to scroll through it and set breakpoints. When you debug the application, that breakpoint should get hit.
Is this not the case? Perhaps I'll try and write a follow up since you aren't the first to have this requirement!
- Amit
Amit,
ReplyDeleteThanks for tutorial. I followed and built the project successfully. I also want to know how to debug the source code so I can better understand the algorithms. Do you know how to attach all source code to the classes instead of doing it one by one?
E.g. I am interested in the DataImportHandler class, but I don't know what java file to attach to it.
Any suggestion on how to pursue that?
- Elaine
Hi Elaine,
ReplyDeleteI'm glad that this tutorial was helpful! Regarding attaching source the classes, this can get a bit tricky because Solr/Lucene has a bunch of source folders that comprise the various jars. Many times I have to use "find" to find the java source file and it's location within the source tree.
I believe DataImportHandler is in the contrib folder last I recall but I haven't been working in Solr for a bit now.
Sorry for the rather lame suggestion but I think 'find' may be your friend here.
Cheers!
Amit
Amit, thank you very much for the pointer. I got it attached.
ReplyDeleteElaine
When i try to run I get "Could not find the main class program will exit." wat did i miss?
ReplyDeleteDid you create a Jetty application or are you trying to run some main routine? Also perhaps ensure that everything built properly and that there are no project errors (missing libraries) that could cause your project to not build hence possibly throw this error.
ReplyDeleteAmit,
ReplyDeleteI tried to run the solr application trhough eclipse but when i try http://localhost:8080/solr/admin/
am getting the below error.What did u give in the web.xml file?
HTTP ERROR: 503
Problem accessing /solr. Reason:
SERVICE_UNAVAILABLE
Please help me with this issue.
Thanks,
Priyanka
26-set-2011 11.50.27 org.apache.solr.common.SolrException log
ReplyDeleteGRAVE: java.lang.RuntimeException: Can't find resource 'solrconfig.xml' in classpath or 'solr\.\conf/', cwd=C:\progetti_eclipse\TestSolr
at org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:268)
at org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader.java:234)
at org.apache.solr.core.Config.(Config.java:141)
at org.apache.solr.core.SolrConfig.(SolrConfig.java:131)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:435)
at org.apache.solr.core.CoreContainer.load(CoreContainer.java:316)
at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:133)
at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:94)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at runjettyrun.Bootstrap.main(Bootstrap.java:82)
Hi smau: did you follow the last bullet item of step 3, setting up a solr folder?
ReplyDeleteThanks
Amit
Thanks Amit...I had also missed this step...it works now...thanks for this tutorial!
DeletePriyanka, I don't think I changed the web.xml at all.. do you have your jetty plugin setup as described above?
ReplyDeleteAmit,
ReplyDeleteI was trying to use it with zk server and get some weird logger errors
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.(QuorumPeerConfig.java:43)
at org.apache.solr.cloud.SolrZkServer.parseConfig(SolrZkServer.java:74)
at org.apache.solr.core.CoreContainer.initZooKeeper(CoreContainer.java:146)
at org.apache.solr.core.CoreContainer.load(CoreContainer.java:335)
at org.apache.solr.core.CoreContainer.load(CoreContainer.java:292)
at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:241)
at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:93)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at runjettyrun.Bootstrap.main(Bootstrap.java:97)
Hello... unfortunately I haven't tried this in a while (moved away from Solr work for the moment) but is log4j on your eclipse classpath?
DeleteIf i ran it without the zk params it works fine. Here is the list of the jar in my webapp/lib. I also tried adding the log4j.jar didnt help.
Deleteant.jar
pache-solr-core-4.0-SNAPSHOT.jar
apache-solr-noggit-r1099557.jar
apache-solr-solrj-4.0-SNAPSHOT.jar
commons-beanutils-1.7.0.jar
commons-codec-1.4.jar
commons-collections-3.2.1.jar
commons-csv-1.0-SNAPSHOT-r966014.jar
commons-fileupload-1.2.1.jar
commons-httpclient-3.1.jar
commons-io-1.4.jar
commons-lang-2.4.jar
guava-r05.jar
jcl-over-slf4j-1.6.1.jar
log4j-over-slf4j-1.6.1.jar
lucene-analyzers-common-4.0-SNAPSHOT.jar
lucene-analyzers-phonetic-4.0-SNAPSHOT.jar
lucene-core-4.0-SNAPSHOT.jar
lucene-grouping-4.0-SNAPSHOT.jar
lucene-highlighter-4.0-SNAPSHOT.jar
lucene-memory-4.0-SNAPSHOT.jar
lucene-misc-4.0-SNAPSHOT.jar
lucene-queries-4.0-SNAPSHOT.jar
lucene-queryparser-4.0-SNAPSHOT.jar
lucene-spatial-4.0-SNAPSHOT.jar
lucene-suggest-4.0-SNAPSHOT.jar
slf4j-api-1.6.1.jar
slf4j-jdk14-1.6.1.jar
uuid-3.2.jar
velocity-1.6.4.jar
velocity-tools-2.0.jar
wstx-asl-3.2.7.jar
zgsolrplugins.jar
zookeeper-3.3.3.jar
So even adding the log4j-1.2.xx (or whatever it's up to now) didn't help when running with the ZK params? I thought with SLF4J there was a log4j impl jar that you have to add? Can you post what parameters you tried so either me or someone else may be able to try? Thanks!
DeleteThis comment has been removed by the author.
DeleteReporting back: Works now, it wasn't anything to do with solr jars. My solr plugin was looking for the jars in the source directory, have to figure out why that was the case. But adding the logger jar to plugin project fixed it.
DeleteGreat to hear! If you find any more information, please post back for others to see!
Deleteconnecting to an external zk server with the following param
ReplyDelete-DzkHost=127.0.0.1:10983 -Dsolr.solr.home=C:\Users\Administrator\Solr\solr
Hi Amit!!
ReplyDeleteGreat Blog!!
I am very much new to using solr,,,,I have set up apache solr using eclipse with the help of your tutorial,,,now i wish to use the search feature of solr in order to search data in xml files present in the exampledocs folder in apache solr,,,however i am not able to understand how to go about doing this with solr integrated in eclipse,,,could you help me out??
Hi Amit,
ReplyDeleteI need your help man!
When I run Run Jetty , Am getting this in the console,
2013-09-18 17:41:18.186:INFO:oejs.Server:jetty-7.6.2.v20120308
2013-09-18 17:41:18.263:WARN:oejx.XmlParser:FATAL@file:/home/bal/workspace/TestSolr/webapp/WEB-INF/web.xml line:1 col:1 : org.xml.sax.SAXParseException; systemId: file:/home/bal/workspace/TestSolr/webapp/WEB-INF/web.xml; lineNumber: 1; columnNumber: 1; Premature end of file.
2013-09-18 17:41:18.264:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/solr,[file:/home/bal/workspace/TestSolr/webapp/]}
org.xml.sax.SAXParseException; systemId: file:/home/bal/workspace/TestSolr/webapp/WEB-INF/web.xml; lineNumber: 1; columnNumber: 1; Premature end of file.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:391)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1404)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1034)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:625)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:819)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:748)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:392)
at org.eclipse.jetty.xml.XmlParser.parse(XmlParser.java:199)
at org.eclipse.jetty.xml.XmlParser.parse(XmlParser.java:215)
at org.eclipse.jetty.webapp.Descriptor.parse(Descriptor.java:60)
at org.eclipse.jetty.webapp.WebDescriptor.parse(WebDescriptor.java:143)
at org.eclipse.jetty.webapp.MetaData.setWebXml(MetaData.java:163)
at org.eclipse.jetty.webapp.WebXmlConfiguration.preConfigure(WebXmlConfiguration.java:55)
at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:418)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)
at org.eclipse.jetty.server.Server.doStart(Server.java:261)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at runjettyrun.Bootstrap.main(Bootstrap.java:82)
2013-09-18 17:41:18.276:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080
Hey dude thanks for the tutorial
ReplyDeletei have some trouble...
i made exaclty what you describe and i get this error:
Starting scanner at interval of 5 seconds.
2013-11-26 15:48:37.422:INFO::jetty-6.1.26
2013-11-26 15:48:37.885:WARN::failed SolrRequestFilter: org.apache.solr.common.SolrException: Could not find necessary SLF4j logging jars. If using Jetty, the SLF4j logging jars need to go in the jetty lib/ext directory. For other containers, the corresponding directory should be used. For more information, see: http://wiki.apache.org/solr/SolrLogging
2013-11-26 15:48:37.885:WARN::Failed startup of context org.mortbay.jetty.webapp.WebAppContext@753ac592{/solr,C:\eclipse\work\MyFirstSolrPrj\webapp}
org.apache.solr.common.SolrException: Could not find necessary SLF4j logging jars. If using Jetty, the SLF4j logging jars need to go in the jetty lib/ext directory. For other containers, the corresponding directory should be used. For more information, see: http://wiki.apache.org/solr/SolrLogging
at org.apache.solr.servlet.SolrDispatchFilter.(SolrDispatchFilter.java:111)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:92)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at runjettyrun.Bootstrap.main(Bootstrap.java:97)
2013-11-26 15:48:37.887:WARN::failed org.mortbay.jetty.webapp.WebAppContext@753ac592{/solr,C:\eclipse\work\MyFirstSolrPrj\webapp}: java.lang.NoClassDefFoundError: org/slf4j/Logger
2013-11-26 15:48:37.887:WARN::Error starting handlers
java.lang.NoClassDefFoundError: org/slf4j/Logger
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at org.mortbay.log.Log.unwind(Log.java:228)
at org.mortbay.log.Log.warn(Log.java:197)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:507)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at runjettyrun.Bootstrap.main(Bootstrap.java:97)
2013-11-26 15:48:37.910:INFO::Started SelectChannelConnector@0.0.0.0:8983
do you know why?
Do you have SLF4j and Log4j on your classpath? Sounds like something isn't properly in place given the NoClassDefFound issue.
ReplyDeleteVery helpful post! Thanks for the help :)
ReplyDeleteHello Amit,
ReplyDeleteI have 1000 xml records , i need to index them and query them . So should i modify my schema.xml for the records to be indexable ?? What could be the best approach to achieve this.
very helpfull nice post .Thanks
ReplyDeleteThe setup guide for Apache SOLR in Eclipse is highly appreciated. Nice Travel Apps It offers clear and concise instructions for integrating SOLR into the Eclipse IDE.
ReplyDeleteGartic io Benzeri Oyunlar
ReplyDeleteA Way Out Benzeri Oyunlar
Fall Guys Benzeri Oyunlar
Roblox Benzeri Oyunlar
Candy Crush Benzeri Oyunlar
VİXS