lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charlie Jackson" <Charlie.Jack...@cision.com>
Subject NullPointerException (not schema related)
Date Tue, 01 May 2007 17:01:31 GMT
Hello,

 

I'm evaluating solr for potential use in an application I'm working on,
and it sounds like a really great fit. I'm having trouble getting the
Collection Distribution part set up, though. Initially, I had problems
setting up the postCommit listener. I first used this xml to configure
the listener:

 

    <listener event="postCommit" class="solr.RunExecutableListener">

      <str name="exe">snapshooter</str>

      <str name="dir">/usr/local/Production/solr/solr/bin/</str>

      <bool name="wait">true</bool>

    </listener>

 

This is what came in the solrconfig.xml file with just a minor tweak to
the directory. However, when I committed data to the index, I was
getting "No such file or directory" errors from the Runtime.exec call. I
verified all of the permissions, etc, with the user I was trying to use.
In the end, I wrote up a little test program to see if it was a problem
with the Runtime.exec call and I think it is. I'm running this on CentOS
4.4 and Runtime.exec seems to have a hard time directly executing bash
scripts. For example, if I called Runtime.exec with a command of
"test_program" (which is a bash script), it failed. If I called
Runtime.exec with a command of "/bin/bash test_program" it worked. 

 

So, with this knowledge in hand, I modified the solrconfig.xml file
again to this:

    <listener event="postCommit" class="solr.RunExecutableListener">

      <str name="exe">/bin/bash</str>

      <str name="dir">/usr/local/Production/solr/solr/bin/</str>

      <bool name="wait">true</bool>

      <str name="args"> <str>snapshooter</str> </str>

    </listener>

 

When I commit data now, however, I get a NullPointerException. I'm
including the stack trace here:

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:710)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:269)

    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:188)

    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:210)

    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:174)

    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:127)

    at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117)

    at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:108)

    at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
51)

    at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:87
0)

    at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:665)

    at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:528)

    at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:81)

    at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:685)

    at java.lang.Thread.run(Thread.java:619)

 

I know this has something to do with my config change (the problem goes
away if I turn off the postCommit listener) but I don't know what!

 

BTW I'm using solr-1.1.0-incubating. 

 

Thanks in advance for any help!

 

Charlie

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message