I finally understand what you meant and called UpdateRequestHandler as
shown below.

curl "http://localhost:8983/solr/w5/update?commit=true&tr=x.xsl

However, I am now getting an error '500 - Unable to initialize
Templates' error. Part of error stack is below. I am not quite
familiar with Solr errors though... turned on debugging but still
can't figure out what I am doing wrong. I know stylesheet is fine
because I can apply it to candidate XML files with xsltproc and it
works.

Searched mailing list archive and came up with this [1]

<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">500</int><int
name="QTime">30</int></lst><lst name="error"><str name="msg">Unable to
initialize Templates 'x.xsl'</str><str
name="trace">java.io.IOException: Unable to initialize Templates
'x.xsl'
at 
org.apache.solr.util.xslt.TransformerProvider.getTemplates(TransformerProvider.java:117)
at 
org.apache.solr.util.xslt.TransformerProvider.getTransformer(TransformerProvider.java:77)
at org.apache.solr.handler.loader.XMLLoader.getTransformer(XMLLoader.java:180)
at org.apache.solr.handler.loader.XMLLoader.load(XMLLoader.java:116)
at 
org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:92)
at 
org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74)
at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
:
:

[1] http://lucene.472066.n3.nabble.com/getTransformer-error-td3047726.html
Lighton Phiri
http://lightonphiri.org


On 18 December 2012 16:27, Lighton Phiri <lighton.ph...@gmail.com> wrote:
>> Are you using 4.0? In 4.0 it has been merged into a single
>
> Sorry, forgot to specify Solr version --I am working with 4.0
>
>>As I understand it, if you post XML tohttp://localhost:8983/solr/update and 
>>provide a tr parameter, it will do
>> the same thing as the XsltUpdateRequestHandler did.
>
> Still no luck getting it to work, I am getting the same 404 error... a
> bit more context here; I am working with the example directory set up
> and so basically started my Solr server with command below. Could it
> be that I don't have the stylesheet in the right place?
>
> java -Dsolr.solr.home="./example-DIH/solr/" -jar start.jar
>
> From what I could see before I dumped my stylesheet in w5 core, db
> core had a similar set up...
>
> ./solr/collection1/conf/xslt
> ./example-DIH/solr/db/conf/xslt
> ./example-DIH/solr/w5/conf/xslt
>
> Lighton Phiri
> http://lightonphiri.org

Reply via email to