https://issues.apache.org/bugzilla/show_bug.cgi?id=50165
Summary: Manually launching Tomcat 7.0.4 on the command line is
impossible
Product: Tomcat 7
Version: 7.0.4
Platform: PC
Status: NEW
Severity: blocker
Priority: P2
Component: Catalina
AssignedTo: [email protected]
ReportedBy: [email protected]
After installing Tomcat you cannot start it manually using bootstrap.jar in the
bin directory because an exception rises.
For example, provided that <base_dir>, <tomcat_install_dir>, <my_temp_dir> are
correct directories, launching Tomcat on the command line results in:
C:\Users\Myself>"C:\Program Files\Java\jdk\bin\java" -Dcatalina.base=<base_dir>
-Dcatalina.h
ome=<tomcat_install_dir> -Djava.io.tmpdir=<my_temp_dir> -jar
<tomcat_install_dir>\bin\bootstrap.jar start
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/juli/logging/LogFactory
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:56)
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 java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 1 more
Could not find the main class: org.apache.catalina.startup.Bootstrap. Program
will exit.
This is a blocker bug, especially if you want to use tomcat 7 for development
and debugging from IDEs (Eclipse, etc..).
Anyway, I discovered where the bug is and fixed it.
The solution:
Unpacking bootstrap.jar (this is where the bug is), which is present in the
direvctory <tomcat_install_dir>\bin,
you discover that in the file
/META-INF/MANIFEST.MF
there is this line at the end of the file:
Class-Path: commons-daemon.jar
However the commons-daemon.jar file is not present in the installation of
Tomcat 7.0.4
So to fix the bug you just need to replace this line:
Class-Path: commons-daemon.jar
with this one:
Class-Path: tomcat-juli.jar
then pack again bootstrap.jar with this modified version of
/META-INF/MANIFEST.MF and replace
the old bootstrap.jar in the bin directory of tomcat installation with the new
packed one.
Problem solved.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]