The most recent 2.0.0-SNAPSHOT of org.apache.sling.scripting.freemarker contains a direct dependency on org.slf4j.Logger and org.slf4j.LoggerFactory. This bundle explicitly does NOT import these packages, however, and so at runtime script execution will fail with a NoClassDefFoundError because the org.apache.sling.scripting.freemarker.FreemarkerScriptEngine class cannot be initialized. Freemarker provides a suitable logging facility that will degrade gracefully if slf4j is missing, but the aforementioned FreemarkerScriptEngine class does not utilize it.
The attached patch removes the slf4j dependency, and resolves this issue.
|Workflow||re-open possible,doc-test-required [ 12788005 ]||no-reopen-closed,doc-test-required [ 12790838 ]|
|Workflow||no-reopen-closed,doc-test-required [ 12766545 ]||re-open possible,doc-test-required [ 12788005 ]|
|Workflow||Copy of no-reopen-closed,doc-test-required [ 12762728 ]||no-reopen-closed,doc-test-required [ 12766545 ]|
|Workflow||no-reopen-closed,doc-test-required [ 12656554 ]||Copy of no-reopen-closed,doc-test-required [ 12762728 ]|
|Fix Version/s||Scripting Freemarker 2.0.0 [ 12320256 ]|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Resolution||Fixed [ 1 ]|
|Assignee||Justin Edelson [ justinedelson ]|
|Field||Original Value||New Value|
|Attachment||Removed_Freemarker_script_engine_dependency_on_slf4j_.patch [ 12517020 ]|