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