sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SLING-7134) Script execution order is not deterministic on Java 9
Date Mon, 04 Dec 2017 22:25:00 GMT

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

ASF GitHub Bot commented on SLING-7134:
---------------------------------------

karlpauls commented on issue #1: SLING-7134 - Script execution order is not deterministic
on Java 9
URL: https://github.com/apache/sling-org-apache-sling-scripting-core/pull/1#issuecomment-349126870
 
 
   I just pushed an update with my proposals mentioned in the above comments namely,
   
   1) use the systemclassloader with a null TCCL to get nashorn on java8; and
   2) an implementation for the suggestion of @kwin  to use the serviceloader to lookup engines
from bundles instead of doing it manually.
   
   The push contains updated junit tests as well and it seem to work for me with both, java8
and java9.
   
   @raducotescu, both, 1) and 2) are only suggestions. Feel free to ignore my push and apply
only your original patch.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Script execution order is not deterministic on Java 9
> -----------------------------------------------------
>
>                 Key: SLING-7134
>                 URL: https://issues.apache.org/jira/browse/SLING-7134
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting, Servlets
>            Reporter: Robert Munteanu
>            Assignee: Radu Cotescu
>             Fix For: Servlets Resolver 2.4.16, Scripting Core 2.0.52
>
>         Attachments: scripting-engines-java-9.png
>
>
> When starting up the Sling launchpad with Java 9 and accessing http://localhost:8080/bin/browser.html
I get an empty page and the following stack trace in the error log
> {noformat}18.09.2017 23:50:44.656 *ERROR* [127.0.0.1 [1505767840754] GET /bin/browser.html
HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcesso
> rImpl service: Uncaught SlingException
> jdk.nashorn.internal.runtime.ECMAException: ReferenceError: "window" is not defined
>         at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
>         at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.referenceError(ECMAErrors.java:319)
>         at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.referenceError(ECMAErrors.java:291)
>         at jdk.scripting.nashorn/jdk.nashorn.internal.objects.Global.__noSuchProperty__(Global.java:1615)
>         at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$1$\^eval\_.:program(<eval>:5)
>         at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:652)
>         at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513)
>         at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:517)
>         at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:420)
>         at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.access$300(NashornScriptEngine.java:72)
>         at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine$3.eval(NashornScriptEngine.java:513)
>         at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:386)
>         at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:184)
>         at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:491)
>         at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552)
>         at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44)
>         at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77)
>         at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282)
>         at org.apache.sling.engine.impl.SlingRequestProcessorImpl.dispatchRequest(SlingRequestProcessorImpl.java:322)
>         at org.apache.sling.engine.impl.request.SlingRequestDispatcher.dispatch(SlingRequestDispatcher.java:211)
>         at org.apache.sling.engine.impl.request.SlingRequestDispatcher.include(SlingRequestDispatcher.java:104)
>         at org.apache.sling.scripting.jsp.taglib.IncludeTagHandler.dispatch(IncludeTagHandler.java:54)
>         at org.apache.sling.scripting.jsp.taglib.AbstractDispatcherTagHandler.doEndTag(AbstractDispatcherTagHandler.java:129)
>         at org.apache.jsp.libs.composum.nodes.console.components.codeeditor.editdialog.editdialog_jsp._jspx_meth_sling_005finclude_005f0(edi
> tdialog_jsp.java:128)
>         at org.apache.jsp.libs.composum.nodes.console.components.codeeditor.editdialog.editdialog_jsp._jspService(editdialog_jsp.java:99)
>         at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
>         at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:502)
>         at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:449)
>         at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java:342)
>         at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.java:97)
>         at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngineFactory.java:603)
>         at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:388)
>         at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:184)
>         at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:491)
>         at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552)
>         at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44)
>         at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77)
>         at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282)
>         at org.apache.sling.engine.impl.SlingRequestProcessorImpl.dispatchRequest(SlingRequestProcessorImpl.java:322)
>         at org.apache.sling.engine.impl.request.SlingRequestDispatcher.dispatch(SlingRequestDispatcher.java:211)
>         at org.apache.sling.engine.impl.request.SlingRequestDispatcher.include(SlingRequestDispatcher.java:104)
>         at org.apache.sling.scripting.jsp.taglib.IncludeTagHandler.dispatch(IncludeTagHandler.java:54)
>         at org.apache.sling.scripting.jsp.taglib.AbstractDispatcherTagHandler.doEndTag(AbstractDispatcherTagHandler.java:129)
>         at org.apache.jsp.libs.composum.nodes.console.browser.dialogs_jsp._jspx_meth_sling_005finclude_005f0(dialogs_jsp.java:391)
>         at org.apache.jsp.libs.composum.nodes.console.browser.dialogs_jsp._jspService(dialogs_jsp.java:131)
>         at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
>         at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:502)
>         at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:449)
>         at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java:342)
>         at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.java:97)
>         at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngineFactory.java:603)
>         at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:388)
>         at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:184)
>         at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:491)
>         at org.apache.sling.scripting.jsp.taglib.CallTag.doEndTag(CallTag.java:124)
>         at org.apache.jsp.libs.composum.nodes.console.browser.browser_jsp._jspx_meth_sling_005fcall_005f1(browser_jsp.java:326)
>         at org.apache.jsp.libs.composum.nodes.console.browser.browser_jsp._jspService(browser_jsp.java:133)
>         at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
>         at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:502)
>         at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:449)
>         at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java:342)
>         at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.java:97)
>         at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngineFactory.java:603)
>         at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:388)
>         at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:184)
>         at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:491)
>         at org.apache.sling.scripting.jsp.taglib.CallTag.doEndTag(CallTag.java:124)
>         at org.apache.jsp.libs.composum.nodes.console.browser.browser_jsp._jspx_meth_sling_005fcall_005f1(browser_jsp.java:326)
>         at org.apache.jsp.libs.composum.nodes.console.browser.browser_jsp._jspService(browser_jsp.java:133)
>         at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
>         at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:502)
>         at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:449)
>         at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java:342)
>         at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.java:97)
>         at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngineFactory.java:603)
>         at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:388)
>         at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:184)
>         at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:491)
>         at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552)
>         at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44)
>         at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77)
>         at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282)
>         at org.apache.sling.engine.impl.SlingRequestProcessorImpl.dispatchRequest(SlingRequestProcessorImpl.java:322)
>         at org.apache.sling.engine.impl.request.SlingRequestDispatcher.dispatch(SlingRequestDispatcher.java:211)
>         at org.apache.sling.engine.impl.request.SlingRequestDispatcher.forward(SlingRequestDispatcher.java:146)
>         at com.composum.sling.core.servlet.AbstractConsoleServlet.doGet(AbstractConsoleServlet.java:66)
>         at org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:270)
>         at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:346)
>         at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:378)
>         at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552)
>         at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44)
>         at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77)
>         at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282)
>         at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49)
>         at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77)
>         at org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:107)
>         at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
>         at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:138)
>         at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
>         at org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151)
>         at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:234)
>         at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:85)
>         at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:79)
>         at org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:96)
>         at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
>         at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
>         at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:138)
>         at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
>         at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
>         at org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:72)
>         at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
>         at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
>         at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:128)
>         at org.apache.felix.http.base.internal.dispatch.DispatcherServlet.service(DispatcherServlet.java:49)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
>         at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848)
>         at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584)
>         at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
>         at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
>         at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
>         at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>         at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
>         at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>         at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
>         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
>         at org.eclipse.jetty.server.Server.handle(Server.java:534)
>         at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
>         at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
>         at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)
>         at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108)
>         at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
>         at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
>         at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
>         at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
>         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
>         at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
>         at java.base/java.lang.Thread.run(Thread.java:844){noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message