java.lang.ClassNotFoundException

tip

You might've forgot to add a dependency or it's written wrong. Also, you might be using incompatible versions of Java and Hibernate. More on this here: https://goo.gl/SjSlRA

tip

If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add to your dependencies. To add it, the groupId is com.fasterxml and artifactId is Classmate.

tip

This error means there's a class missing in your classpath during runtime. You need to create a jar with all your dependencies and have it in your classpath. Check Maven Assembly Plugin and how to add your dependencies to a jar: https://goo.gl/U2zr8k

tip

jsp-api and servlet-api jars must NOT be deployed by your web app. They should be marked as provided but not deployed by your app.

tip

The server rejects all jars that already belong to the server runtime (such as tomcat-**.jar, servlet**.jar). Consider substituting the CORS filter you're using for this one: https://goo.gl/ctQ7Fs

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • gradle | Apache Help Blog
    via by Unknown author,
  • Spring WS on Glassfish
    via by Unknown author,
  • Error when trying to build: {code} [workspace] $ /home/bristol/gradle/gradle-0.9-rc-1/bin/gradle -Psrcdir=/usr/share/tomcat6/hudson/job/DevEnv/ws/ -Pdestdir=yy createXde -b setup/admin.gradle Could not load Logmanager "org.apache.juli.ClassLoaderLogManager" java.lang.ClassNotFoundException: org.apache.juli.ClassLoaderLogManager at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) at java.util.logging.LogManager$1.run(LogManager.java:185) at java.security.AccessController.doPrivileged(Native Method) at java.util.logging.LogManager.<clinit>(LogManager.java:175) at org.gradle.logging.JavaUtilLoggingConfigurer.configure(JavaUtilLoggingConfigurer.java:33) at org.gradle.logging.DefaultLoggingConfigurer.configure(DefaultLoggingConfigurer.java:34) at org.gradle.logging.LoggingSystemAdapter.setLevel(LoggingSystemAdapter.java:55) at org.gradle.logging.LoggingSystemAdapter.on(LoggingSystemAdapter.java:42) at org.gradle.logging.DefaultLoggingManager$StartableLoggingSystem.start(DefaultLoggingManager.java:154) at org.gradle.logging.DefaultLoggingManager.start(DefaultLoggingManager.java:56) at org.gradle.logging.DefaultLoggingManager.start(DefaultLoggingManager.java:31) at org.gradle.initialization.DefaultGradleLauncherFactory.<init>(DefaultGradleLauncherFactory.java:50) at org.gradle.GradleLauncher.<clinit>(GradleLauncher.java:48) at org.gradle.launcher.Main.execute(Main.java:89) at org.gradle.launcher.Main.main(Main.java:42) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.gradle.launcher.GradleMain.main(GradleMain.java:49) FAILURE: Build failed with an exception. * Where: Empty settings file * What went wrong: Could not compile empty settings file. Cause: startup failed: /usr/share/tomcat6/.gradle/caches/0.9-rc-1/scripts/script_d41d8cd98f00b204e9800998ecf8427e/buildscript_SettingsScript/script_d41d8cd98f00b204e9800998ecf8427e.class (No such file or directory) {code}
    via by snowch,
  • Could not load Logmanager "com.sun.enterprise.server.logging.ServerLogManager" java.lang.ClassNotFoundException: com.sun.enterprise.server.logging.ServerLogManager at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.util.logging.LogManager$1.run(LogManager.java:166) at java.security.AccessController.doPrivileged(Native Method) at java.util.logging.LogManager.<clinit>(LogManager.java:156) at com.tc.object.bytecode.hook.impl.ClassProcessorHelper.init(ClassProcessorHelper.java:405) at com.tc.object.bytecode.hook.impl.ClassProcessorHelper.systemLoaderInitialized(ClassProcessorHelper.java:795) at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1327) at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1286) Glassfish relies on the thread context classloader being set to a glassfish loader when jdk logging is initialized. It is hard to not intialize jdk logging (usually a side effect of using some other built in java type (eg. HttpUrlConnection)). Furthermore, in TC we explicitly initialize jdk logging very early in the VM startup to workaround the known deadlocks that exist in LogManager.<clinit> There is an unsupported workaround available here: http://svn.terracotta.org/svn/forge/projects/glassfish-logging
    via by Tim Eck,
  • DSO with glassfish
    via by Unknown author,
  • Directing JUL logging to SLF4J does not work
    via Stack Overflow by Sergio
    ,
  • Could not load Logmanager "com.sun.enterprise.server.logging.ServerLogManager" java.lang.ClassNotFoundException: com.sun.enterprise.server.logging.ServerLogManager at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.util.logging.LogManager$1.run(LogManager.java:166) at java.security.AccessController.doPrivileged(Native Method) at java.util.logging.LogManager.<clinit>(LogManager.java:156) at com.tc.object.bytecode.hook.impl.ClassProcessorHelper.init(ClassProcessorHelper.java:405) at com.tc.object.bytecode.hook.impl.ClassProcessorHelper.systemLoaderInitialized(ClassProcessorHelper.java:795) at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1327) at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1286) Glassfish relies on the thread context classloader being set to a glassfish loader when jdk logging is initialized. It is hard to not intialize jdk logging (usually a side effect of using some other built in java type (eg. HttpUrlConnection)). Furthermore, in TC we explicitly initialize jdk logging very early in the VM startup to workaround the known deadlocks that exist in LogManager.<clinit> There is an unsupported workaround available here: http://svn.terracotta.org/svn/forge/projects/glassfish-logging
    via by Tim Eck,
    • java.lang.ClassNotFoundException: 1catalina.org.apache.juli.FileHandler 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:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at java.util.logging.LogManager$4.run(LogManager.java:808) at java.security.AccessController.doPrivileged(Native Method) at java.util.logging.LogManager.loadLoggerHandlers(LogManager.java:802) at java.util.logging.LogManager.addLogger(LogManager.java:1008) at java.util.logging.LogManager$1.run(LogManager.java:209) at java.security.AccessController.doPrivileged(Native Method) at java.util.logging.LogManager.<clinit>(LogManager.java:181) at org.gradle.logging.internal.JavaUtilLoggingConfigurer.configure(JavaUtilLoggingConfigurer.java:36) at org.gradle.logging.internal.DefaultLoggingConfigurer.configure(DefaultLoggingConfigurer.java:34) at org.gradle.logging.internal.LoggingSystemAdapter.setLevel(LoggingSystemAdapter.java:55) at org.gradle.logging.internal.LoggingSystemAdapter.on(LoggingSystemAdapter.java:42) at org.gradle.logging.internal.DefaultLoggingManager$StartableLoggingSystem.start(DefaultLoggingManager.java:191) at org.gradle.logging.internal.DefaultLoggingManager.start(DefaultLoggingManager.java:60) at org.gradle.logging.internal.DefaultLoggingManager.start(DefaultLoggingManager.java:31) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:201) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22) at org.gradle.launcher.Main.doAction(Main.java:33) at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54) at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35) at org.gradle.launcher.GradleMain.main(GradleMain.java:23)

    Users with the same issue

    CasperCasper
    4 times, last one,
    HandemelindoHandemelindo
    1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    rprp
    3 times, last one,
    1188 more bugmates