Bug 45983 - catalina.sh fails to start tomcat if conf/logging.properties is missing
Summary: catalina.sh fails to start tomcat if conf/logging.properties is missing
Status: RESOLVED DUPLICATE of bug 45585
Alias: None
Product: Tomcat 6
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 6.0.18
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: default
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-09 21:56 UTC by Rod
Modified: 2008-10-10 00:02 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rod 2008-10-09 21:56:17 UTC
JRE: Sun 1.6.0_10

Upon upgrading from 6.0.13 to 6.0.18 I couldn't get my Tomcat instances to start.

I run 11 separate Tomcat instances on the same server all from the same CATALINA_HOME by specifying different a different CATALINA_BASE for each. After upgrading to 6.0.18 I could only get the following:

Exception in thread "main" java.lang.NoClassDefFoundError: 
Caused by: java.lang.ClassNotFoundException: 
	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:307)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: .  Program will exit.

I discovered that it was because I don't have logging.properties in CATALINA_BASE/conf/ and by putting one there (or simply creating a blank one) it would start OK.

Without logging.properties, catalina.sh builds the start command to be (obtained by substituting echo for exec inside the "run" section, edited for bugzilla):

<jre dir>/bin/java -Djava.endorsed.dirs=<home dir>/endorsed -classpath :<home dir>/bin/bootstrap.jar -Dcatalina.base=<base dir> -Dcatalina.home=<home dir> -Djava.io.tmpdir=<base dir>/temp org.apache.catalina.startup.Bootstrap start

And with logging.properties the start command becomes:

<jre dir>/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=<base dir>/conf/logging.properties -Djava.endorsed.dirs=<home dir>/endorsed -classpath :<home dir>/bin/bootstrap.jar -Dcatalina.base=<base dir> -Dcatalina.home=<home dir> -Djava.io.tmpdir=<base dir>/temp org.apache.catalina.startup.Bootstrap start

I can't suggest why this causes the JVM to have ClassLoader issues and the interesting thing is that if I copy and paste the exact start command of the no-logging.properties version (above) straight into the command-line then it starts so it's only when doing the exec inside catalina.sh that it fails.
Comment 1 Mark Thomas 2008-10-10 00:02:58 UTC

*** This bug has been marked as a duplicate of bug 45585 ***