You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2013/01/08 14:22:12 UTC
[jira] [Created] (SLING-2704) NPE in JspScriptEngineFactory in case
JSP bundle restart while servicing request
Chetan Mehrotra created SLING-2704:
--------------------------------------
Summary: NPE in JspScriptEngineFactory in case JSP bundle restart while servicing request
Key: SLING-2704
URL: https://issues.apache.org/jira/browse/SLING-2704
Project: Sling
Issue Type: Bug
Components: Scripting
Affects Versions: Scripting JSP 2.0.26
Reporter: Chetan Mehrotra
Priority: Minor
If a jsp perform some operation (some admin function) which results in restart of various bundle then its possible that org.apache.sling.scripting.jsp bundle also gets restarted. Due to which following NPE is seen in logs. This happens because the 'jspFactoryHandler' in JspScriptEngineFactory becomes null by the time service call returns (due to component deactivation)
A simple fix might be to create a local copy of jspFactoryHandler and use that (Thanks to Felix for suggesting this!!). Would attach a patch also with the fix
Uncaught SlingException java.lang.NullPointerException
at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java:243)
at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.java:86)
at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngineFactory.java:441)
at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:361)
at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:171)
at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:463)
at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:508)
at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:64)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira