Some versions of the OpenJDK doesn´t include the Rhino Engine to run javascript 
dataimport. You have to use the Oracle JDK.

Juampa.
________________________________________
De: randolf.julian [randolf.jul...@dominionenterprises.com]
Enviado el: martes, 20 de marzo de 2012 5:41
Para: solr-user@lucene.apache.org
Asunto: SOLR 3.3 DIH and Java 1.6

I am trying to use the data import handler to update SOLR index with Oracle
data. In the SOLR schema, a dynamic field called PHOTO_* has been defined. I
created a script transformer:

  <script>


and called it in a query:

       <entity name="photo" transformer="script:pivotPhotos"
               query="select
p.path||','||p.photo_barcode||','||p.display_order REC_PHOTO,
                             lpad(p.display_order,3,'0') SEQUENCE_NUMBER
                        from traderadm.photo p
                        where p.realm_id = '${ad.REALM_ID}'
                          and p.ad_id = '${ad.AD_ID}'
                        order by p.display_order"/>

However, whenever I run a full import, it fails with this error in the
solr0.log file:

Full Import
failed:org.apache.solr.handler.dataimport.DataImportHandlerException:
&lt;script&gt; can be used only in java 6 or above

Here's the output of my java version:

$ java -version
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.6) (rhel-1.13.b16.el5-x86_64)
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)

I believe we are using java 6.

I am lost with this error and need help on why this is happening.

Thanks.

- Randolf


--
View this message in context: 
http://lucene.472066.n3.nabble.com/SOLR-3-3-DIH-and-Java-1-6-tp3841355p3841355.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to