We initially considered using GraalVM but had difficulty finding out what jars should be included in Solr (or how to build those). We were also not sure about the scripting features or compatibility with our existing update scripts. Of course GraalVM would be a better alternative since it is actively maintained.

Markos

On 10/18/24 16:10, David Eric Pugh wrote:
  Thanks for sharing this.   I am a bit fuzzy on what the path forward to Java 
21, no security manager, and continuing to be able support the Nashorn based 
scripting libraries.    My understanding is Nashorn is no longer in Java.   The 
github repo you mentioned doesn't seem super active but might work for us.

I also saw references to GraalVM, and  
https://www.graalvm.org/latest/reference-manual/js/ScriptEngine/ implementation.

It will be interesting to see where we go with one of my favorite features of Solr, the 
scriptingupdaterequestprocessor!  I always think of it as "the tool I reach for when 
I am in trouble in data processing ;-) ".
I would love more folks to be thinking about this path and discussiong (maybe 
on the dev mailing list) there thoughts of where we go.

Eric

     On Friday, October 18, 2024 at 08:53:15 AM EDT, Markos Volikas 
<mvoli...@apache.org> wrote:
Hi Doss,

I had to include more jars. What worked for me was the following:

- Clone https://github.com/openjdk/nashorn and build with
     ```
     cd make/nashorn
     ant jar
     ```
- Copy the following generated jars to .../solr-9.7.0/lib/

     .../nashorn/build/nashorn/dist/jjs.jar
     .../nashorn/build/nashorn/dist/nashorn.jar
     .../nashorn/build/nashorn/dependencies/asm-7.3.1.jar
     .../nashorn/build/nashorn/dependencies/asm-analysis-7.3.1.jar
     .../nashorn/build/nashorn/dependencies/asm-commons-7.3.1.jar
     .../nashorn/build/nashorn/dependencies/asm-tree-7.3.1.jar
     .../nashorn/build/nashorn/dependencies/asm-util-7.3.1.jar

You might also have to disable the Solr security manager by setting 
`SOLR_SECURITY_MANAGER_ENABLED=false` in .../solr-9.7.0/bin/solr.in.sh. See 
also 
https://solr.apache.org/guide/solr/latest/upgrade-notes/major-changes-in-solr-9.html#security-3.

I hope that helps,
Markos

On 2024/10/18 09:00:18 Doss wrote:
Hi All,

I am trying to do some scriptTransformer activity while importing data to
SOLR 9.4.0 (Plugin https://github.com/SearchScale/dataimporthandler)

I am getting the following error even after placing
the nashorn-core-15.4.jar under <SOLR_HOME>/lib

Enabled scripting using SOLR_MODULES

org.apache.solr.handler.dataimport.DataImportHandlerException: Cannot load
Script Engine for language: JavaScript Processing

Please help.

Same with: Groovy also

Reply via email to