Seem to have a problem starting my Java app:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory at org.apache.catalina.util.LifecycleBase.(LifecycleBase.java:37) Caused by: java.lang.ClassNotFoundException: org.apache.juli.logging.LogFactory 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:423) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) ... 1 more
Tried the solution here: java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
But I see tomcat-juli.jar already. Also I'm using Tomcat 7. What might be wrong?
Your vm does not find the class org/apache/juli/logging/LogFactory
check if this class is present in the tomcat-juli.jar that you use (unzip it and search the file), if it's not present download the library from apache web site else if it's present put the tomcat-juli.jar in a path (the lib directory) that Tomcat use to load classes. If your Tomcat does not find it you can copy the jar in the lib directory of the JRE that you are using.
I ran into this problem when using tomcat-embed-core::7.0.47
, from Maven. I'm not sure why they didn't add tomcat-util
as a runtime dependency, so I added my own runtime dependency to my own project.
<dependency> <groupId>org.apache.tomcat</groupId> <artifactId>tomcat-util</artifactId> <version><!-- version from tomcat-embed-core --></version> <scope>runtime</scope> </dependency>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With