[
https://issues.apache.org/jira/browse/SLING-7241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16265134#comment-16265134
]
Nicolas Peltier commented on SLING-7241:
----------------------------------------
Hey [~bdelacretaz],
"first" call is done with no parameter, which will take thread's class loader
[0]. Second [1] with "null" parameter which takes root classloader, and fixes
[~bcsott] issue. May be a method getScriptEngine with both calls in the same
place would make things clearer.
agreed with the constant
[0]
https://github.com/bcsott/sling-org-apache-sling-pipes/blob/bd15e86e7b3f37112fe06f26d86342a0832f969a/src/main/java/org/apache/sling/pipes/PipeBindings.java#L53
[1]
https://github.com/bcsott/sling-org-apache-sling-pipes/blob/bd15e86e7b3f37112fe06f26d86342a0832f969a/src/main/java/org/apache/sling/pipes/PipeBindings.java#L80
> [pipes] Nashorn ScriptEngine in PipeBindings is null
> ----------------------------------------------------
>
> Key: SLING-7241
> URL: https://issues.apache.org/jira/browse/SLING-7241
> Project: Sling
> Issue Type: Bug
> Components: Extensions
> Affects Versions: Pipes 1.0.4
> Environment: java.runtime.name = Java(TM) SE Runtime Environment
> java.runtime.version = 1.8.0_144-b01
> Reporter: Björn Csott
> Assignee: Nicolas Peltier
> Priority: Minor
> Fix For: pipes 2.0.0
>
> Attachments: error.log
>
>
> Under some unclear circumstances the ScriptEngine in PipeBindings does not
> get initialized.
> There is a solution out there to attach Nashorn to the system bundle. Appart
> from that I was able to fix it by using a different constructor:
> ScriptEngineManager(null).
> The issue can be reproduced by deploying
> https://github.com/bcsott/migration-tool
> When it fails the following is written to stderror.log:
> ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory:
> Provider jdk.nashorn.api.scripting.NashornScriptEngineFactory not found
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)