The element <str name="dir"> specifies the working directory for the call to
Runtime.exec().  You still need to set up your PATH if you don't use an
absolute path for the "exe" element.  As Chris has pointed out, the best
thing to do is to use an absolute path.

Bill


On 8/14/07, Chris Hostetter <[EMAIL PROTECTED]> wrote:
>
>
> : I am trying out the event listener by uncommenting the listener for
> : event postCommit unmodified.  Solr detected the script during start up
> : (otherwise it would throw some exception).  However, when i sent the
>
> no, actually the RunExecutableListener doesn't check for the scripts when
> it's initialized -- it can't.  you might be asking it to execute a comman
> that will be found at runtime based on the PATH, it has no way of knowing.
>
> : snippet below).  It seems that solr is not honoring the value of the
> : element <str name="dir">.
>
> "dir" does not need to be the directory where the script is found, as the
> comment in the example config says it is the directory "...to use as the
> current working directory."
>
> : The solr is running in tomcat and I started tomcat at the directory
> : above solr home directory.  ( cwd=/home/dwu SolrHome=/home/dwu/solr/ ).
>
> If you started tomcat with a cwd of /home/dwu and your solr home is
> /home/dwu/solr/ then the relative dir from the example solrconfig.xml of
> solr/bin should work -- assuming the user running tomcat has a PATH
> containing "."  (if not, you can always specify it explicitly using the
> "env" option to RunExecutableListener).
>
> in general, i would recommend always using an absolute path for the "exe"
> option -- it's just not possible to do that in the example config since we
> don't know where it will be installed.
>
> : I am not sure if i did something wrong or this is a bug.  Either way, it
> : would be helpful if the exception can tell the full path name the
> : handler is tying to call.
>
> the exception is actaully showing you the full name of hte executible it's
> trying to execute, that's "snapshooter" ... unfortunately it doesn't show
> you the working directory it's trying to use (or tell you what the PATH is
> ... but that's kind of a platform specific issue that the Runtime class
> abstracts away from Solr)
>
>
>
> -Hoss
>
>

Reply via email to