Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-12128

Log4j dependency issue in shell

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.7.2
    • Component/s: Shell

      Description

      When trying to connect to the nuxeo server using nuxeo shell (from the jar directly), it returns:

      Failed to instantiate SLF4J LoggerFactory
      Reported exception:
      java.lang.NoClassDefFoundError: org/apache/log4j/Level
          at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128)
          at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:107)
          at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:295)
          at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269)
          at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:156)
          at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132)
          at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:645)
          at org.nuxeo.ecm.automation.client.jaxrs.spi.AsyncAutomationClient.<clinit>(AsyncAutomationClient.java:27)
          at org.nuxeo.shell.automation.AutomationFeature.connect(AutomationFeature.java:66)
          at org.nuxeo.shell.automation.cmds.Connect.run(Connect.java:72)
          at org.nuxeo.shell.Shell.run(Shell.java:503)
          at org.nuxeo.shell.Shell.run(Shell.java:498)
          at org.nuxeo.shell.Shell.run(Shell.java:492)
          at org.nuxeo.shell.cmds.Interactive.run(Interactive.java:121)
          at org.nuxeo.shell.Shell.run(Shell.java:503)
          at org.nuxeo.shell.Shell.run(Shell.java:498)
          at org.nuxeo.shell.Shell.run(Shell.java:492)
          at org.nuxeo.shell.Shell.main(Shell.java:281)
          at org.nuxeo.shell.Main.main(Main.java:26)
      Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Level
          at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
          at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      

      Workaround is to provide the missing file in the classpath: java -cp /var/lib/nuxeo/server/lib/log4j-1.2.17.jar:/var/lib/nuxeo/server/client/nuxeo-shell-5.7.1.jar org.nuxeo.shell.Main

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: