RE: Null pointer exception
Thanks a lot for your reply Chris I am running v1.1.0. If I do a search (from the admin page), it throws the following exception: java.lang.RuntimeException: java.io.IOException: /var/www/html/solr/data/index not a directory There are no exceptions on starting Tomcat, only one warning regarding JMS client lib not found (related to Cocoon). I have named a file solr.xml in my $TOMCAT_HOME/conf/Catalina/localhost directory containing the following: Context docBase=/usr/local/tomcat/webapps/solr.war debug=0 crossContext=true Environment name=solr type=java.lang.String value=/var/www/html/solr override=true / /Context I am using the example configs (unmodified). Thanks again Gary Gary Browne Development Programmer Library IT Services University of Sydney Australia ph: 61-2-9351 5946 -Original Message- From: Chris Hostetter [mailto:[EMAIL PROTECTED] Sent: Tuesday, 15 May 2007 7:27 AM To: solr-user@lucene.apache.org Subject: Re: Null pointer exception : I have tried indexing from the exampledocs which is just sitting in my : user home directory but now I get a null pointer exception after : running: just to clarify: are you using solr 1.1 or a nightly build? did you check the log file to ensure thatthere are no exceptions when you start tomcat? are you using the example solrconfig.xml and schema.xml? have you tried doing a search first without indexing any docs to see if that executs and (correctly) returns 0 docs? If i had to guess, i'd speculate that you aren't correctly using a system prop or JNDI to point Solr at your solr home dir, so it's not finding the configs; either that, or you've modified the configs and there is a syntax error -- either way there should be an exception when the server starts up, well before you update any docs. -Hoss
RE: Null pointer exception
Hi Chris The /var/www/html/solr/data/ directory did exist. I tried opening up permissions completely for testing but no luck (the tomcat user had write permissions). I decided to trash the whole installation and start again. I downloaded last nights build and untarred it. Put the .war into $TOMCAT_HOME/webapps. Copied the example/solr directory as /var/www/html/solr. No JNDI file this time, just updated solrconfig to read /var/www/html/solr as my data.dir. I can access the admin page but when I try an index action from the commandline, or a search from the admin page, I get something like: The requested resource (/solr/select/) is not available I have other apps running under tomcat okay, seems like it can't find the lib .jars or can't access the classes within them? Stuck... Cheers Gary Gary Browne Development Programmer Library IT Services University of Sydney Australia ph: 61-2-9351 5946 -Original Message- From: Chris Hostetter [mailto:[EMAIL PROTECTED] Sent: Tuesday, 15 May 2007 9:51 AM To: solr-user@lucene.apache.org Subject: RE: Null pointer exception : I am running v1.1.0. If I do a search (from the admin page), it throws : the following exception: : : java.lang.RuntimeException: java.io.IOException: : /var/www/html/solr/data/index not a directory does /var/www/html/solr/data/ exist? ... if so does the effective userID for tomcat have permission to write to it? if not does the effective userID for tomcat have permission to write to /var/www/html/solr/ ? -Hoss
Null pointer exception
Hi All Thanks very much for your help with indexing setup. I should elucidate my directory/file setup just to check that I have everything in the right place. I have running under $TOMCAT_HOME/webapps the solr directory containing admin, WEB-INF and META-INF directories. Under my web root I have the solr directory containing the bin, conf and data directories. I have tried indexing from the exampledocs which is just sitting in my user home directory but now I get a null pointer exception after running: ./post.sh solr.xml Can anyone offer advice on this please? (I've attached the trace for reference) Thanks again Gary Gary Browne Development Programmer Library IT Services University of Sydney Australia ph: 61-2-9351 5946 May 14, 2007 1:17:34 PM org.apache.solr.core.SolrException log SEVERE: java.lang.NullPointerException at org.apache.solr.core.SolrCore.update(SolrCore.java:716) at org.apache.solr.servlet.SolrUpdateServlet.doPost(SolrUpdateServlet.java:53) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) May 14, 2007 1:17:34 PM org.apache.solr.core.SolrException log SEVERE: Exception during commit/optimize:java.lang.NullPointerException at org.apache.solr.core.SolrCore.update(SolrCore.java:763) at org.apache.solr.servlet.SolrUpdateServlet.doPost(SolrUpdateServlet.java:53) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
Still having indexing problems
Hello I have tried indexing the example files using the Jetty method, rather than Tomcat, which still didn't work. I would prefer to use my Tomcat URL. After starting jettty, I issued Java -jar post.jar http://localhost:8983/solr/update solr.xml monitor.xml as in the examples on the tutorial, but post.jar cannot be found... Where is it? Is there a path variable I need to set up somewhere? Any help greatly appreciated. Regards, Gary Gary Browne Development Programmer Library IT Services University of Sydney Australia ph: 61-2-9351 5946