Sling
  1. Sling
  2. SLING-2432

java.lang.NoClassDefFoundError when using Freemarker ScriptingEngine [patch included]

    Details

      Description

      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.

        Activity

        Hide
        Sean Kleinjung added a comment -

        Patch detailed in bug description.

        Show
        Sean Kleinjung added a comment - Patch detailed in bug description.
        Hide
        Justin Edelson added a comment -

        applied patch in r1303033. Thanks!

        Show
        Justin Edelson added a comment - applied patch in r1303033. Thanks!

          People

          • Assignee:
            Justin Edelson
            Reporter:
            Sean Kleinjung
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development