[ 
https://issues.apache.org/jira/browse/SLING-7241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16254980#comment-16254980
 ] 

Björn Csott commented on SLING-7241:
------------------------------------

[~npeltier], I was debugging several solutions. Using the PlumberServlet via 
curl always works. So I started to investigate whats the difference. I added 
the <Bundle-RequiredExecutionEnvironenment> which was the only missing piece in 
my bundle.

The result of my investigation was:
* Copy of Plumber Servlet in my Bundle -> does not work
* Plumber in Service called from Servlet -> does not work
* Plumber in Service executed via JMX -> works
* Plumber in Servlet ->does not work

No difference on Mac or Windows. Also tried several JVM versions. No difference.
The only stable solution I found (besides adding Nashorn to system bundle) is 
using the other constructor. I think 
https://issues.apache.org/jira/browse/SLING-7134?focusedCommentId=16187822&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16187822
 describes also this strange behavior.

> [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
>            Priority: Minor
>         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)

Reply via email to