Unable to start tomcat server in netbeans and eclipse
I am trying to run Tomcat 6.0.18 from Netbeans 6.7 but getting the following output
on the server console.java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:54)
Caused by: java.lang.ClassNotFoundException: org.apache.juli.logging.LogFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
I have tried reinstalling , tried different versions of tomcat viz. 6.0.24 , 7.0.16 , 5.5 etc , shifted from eclipse to netbeans to but don't why it is coming. In one of the replies for the same it was suggested to add $CATALINA_HOME\bin\tomcat-juli.jar to the launch configuraton in case of eclipse but in netbeans this library along with the others in lib folder have already been added. still the situat开发者_StackOverflow社区ion is same :(
try this , it has solved the problem
it seems that the META-INF/MANIFEST.MF
file in the bootstrap.jar
contains a no reference for
tomcat-juli.jar
just add/update this entry in META-INF/MANIFEST.MF
file in the bootstrap.jar
Class-Path: commons-daemon.jar tomcat-juli.jar
and then try to run the tomcat sever
Hi,I have just begun to learn, also encountered the same problem, and finally I get through the following steps:
- Tomcat v7.0 Apache Open,
- Information Overview in General launch
- Open configuration >Edit >Configuration, >Classpath, >Entries,
- External TOMCAT_HOME/bin/tomcat-juli.jar
- restart your lomboz
For more information,you can view this picture,hope this will fix your problems.
For some reason, the tomcat-juli.jar
(or whichever JAR contains org.apache.juli.logging.LogFactory
) isn't added to the classpath.
You don't say how you start tomcat (Eclipse Tomcat plugin, Web Tools, ANT script, ...) so it's hard to say why it's not there. If you can, add a breakpoint in URLClassLoader.java:202
and examine the result of calling getURLs()
(see point #5 in 5 Tips for Debugging Java Code in Eclipse).
Bootstrap.jar is missing that is why this Exception is coming
精彩评论