https://issues.apache.org/bugzilla/show_bug.cgi?id=45983

           Summary: catalina.sh fails to start tomcat if
                    conf/logging.properties is missing
           Product: Tomcat 6
           Version: 6.0.18
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: [EMAIL PROTECTED]


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.


-- 
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]

Reply via email to