Konrad Windszus created SLING-5766:
--------------------------------------
Summary: Sightly: Automatically clear all compiled scripts when
the Sightly Engine Bundle was updated
Key: SLING-5766
URL: https://issues.apache.org/jira/browse/SLING-5766
Project: Sling
Issue Type: Improvement
Components: Scripting
Affects Versions: Scripting Sightly Engine 1.0.12
Reporter: Konrad Windszus
After upgrading to a newer version of the {{Sightly Scripting}} bundle it may
be that the compiled servlets are no longer working. This is always the case
whenever the Sightly Servlet contains calls to methods in the {{Sightly
Scripting}} bundle whose signature has been changed (in an binary incompatible
way)
After I upgraded from 1.0.2 to 1.0.12 I ran into this issue.
The following exception was thrown then
{code}
java.lang.NoSuchMethodError:
org.apache.sling.scripting.sightly.impl.engine.runtime.RenderContextImpl.resolveProperty(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
at
apps.daimler.embxp_wholesale.base.components.pages.basepage.SightlyJava_basepage.render(SightlyJava_basepage.java:40)
at
org.apache.sling.scripting.sightly.impl.engine.runtime.RenderUnit.render(RenderUnit.java:54)
at
org.apache.sling.scripting.sightly.impl.engine.SightlyScriptEngine.evaluateScript(SightlyScriptEngine.java:92)
at
org.apache.sling.scripting.sightly.impl.engine.SightlyScriptEngine.eval(SightlyScriptEngine.java:78)
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:547)
at
org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44)
at
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77)
{code}
Only after manually clearing the compiled servlet's in the filesystem
classloaders directory the exception disappeared.
Either that clearing must be done automatically (preferred solution) or at
least there must be an easy way to clear the compiled Sightly servlets in that
case.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)