You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2007/10/09 16:35:48 UTC
DO NOT REPLY [Bug 43578] New: - Tomcat fails to start on linux if CATALINA_HOME contains a space
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43578>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43578
Summary: Tomcat fails to start on linux if CATALINA_HOME contains
a space
Product: Tomcat 6
Version: 6.0.14
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: basil@existanze.com
I've managed to reproduce this on Fedora core 6 and Ubuntu Feisty using the
binary distribution tarballs of tomcat 6.0.14 and 5.5.25.
export JAVA_HOME=<path to java>
tar xzf <path to tarball>/apache-tomcat-*.tar.gz
mv apache-tomcat* "my tomcat directory"
bash "my tomcat directory/bin/catalina.sh" run
result:
Using CATALINA_BASE: /home/basil/test/my tomcat directory
Using CATALINA_HOME: /home/basil/test/my tomcat directory
Using CATALINA_TMPDIR: /home/basil/test/my tomcat directory/temp
Using JRE_HOME: /usr/lib/jvm/java-6-sun
Exception in thread "main" java.lang.NoClassDefFoundError: tomcat
if "my tomcat directory" is replaced with, for example, "mytomcatdirectory",
tomcat starts with no error. This error will also occur if a parent directory
contains a space and CATALINA_HOME itself doesn't.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 43578] - Tomcat fails to start on linux if CATALINA_HOME contains a space
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43578>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43578
gregory.joseph@magnolia.info changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |regression
------- Additional Comments From gregory.joseph@magnolia.info 2007-11-28 13:13 -------
Same here on OSX, with 5.5.25 and 5.5.20. This was definitely working with 5.0.28.
This can not have been unnoticed for so long, right? What's going on? I'm sure it's been reported many
times, but bugzilla being so user-friendly, I could hardly find anything...
Anyone knows if this was introduced in 5.5.2x or if it's there since 5.5.0 ?
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 43578] - Tomcat fails to start on linux if CATALINA_HOME contains a space
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43578>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43578
------- Additional Comments From gregory.joseph@magnolia.info 2007-11-28 13:16 -------
Note that the exception is slightly different is your path only has one space (I get exactly the same
behaviour, i.e NCDFE on the second "word" if several spaces)
$ ./startup.sh && tail -f ../logs/catalina.outUsing CATALINA_BASE: /Applications/dev/test
test2/apache-tomcat-5.5.25
Using CATALINA_HOME: /Applications/dev/test test2/apache-tomcat-5.5.25
Using CATALINA_TMPDIR: /Applications/dev/test test2/apache-tomcat-5.5.25/temp
Using JRE_HOME: /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home
Exception in thread "main" java.lang.NoClassDefFoundError: test2/apache-tomcat-
5/5/25/conf/logging/properties
^C
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 43578] - Tomcat fails to start on linux if CATALINA_HOME contains a space
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43578>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43578
gregory.joseph@magnolia.info changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gregory.joseph@magnolia.info
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 43578] - Tomcat fails to start on linux if CATALINA_HOME contains a space
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43578>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43578
------- Additional Comments From ray@sauers.com 2007-11-29 04:53 -------
I encountered a similar problem this morning, with CATALINA_BASE containing a space.
Here's what I have found:
1. The problem seems to be in the setting of JAVA_OPTS in the following:
# Set juli LogManager if it is present
if [ -r "$CATALINA_HOME"/bin/tomcat-juli.jar ]; then
JAVA_OPTS="$JAVA_OPTS "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" "-
Djava.util.logging.config.file="$CATALINA_BASE/conf/logging.properties"
fi
If CATALINA_BASE has spaces, the shell splits JAVA_OPTS on the spaces when running the Java
command line, causing the NCDFE.
2. I confirmed this by removing tomcat-juli.jar from bin, and tomcat started fine. This changed logging,
so it wasn't a proper fix.
3. I was able to get things running, including logging, by making the following changes to catalina.sh
# Set juli LogManager if it is present
if [ -r "$CATALINA_HOME"/bin/tomcat-juli.jar ]; then
JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
LOGGING_CONFIG="-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties"
fi
and then adding "$LOGGING_CONFIG" (note the quotes) to all places where JAVA_OPTS is passed to the
java command line. For example:
exec "$_RUNJDB" $JAVA_OPTS "$LOGGING_CONFIG" $CATALINA_OPTS \
I'm not sure if this is the best way to fix this, but it works by keeping the spaces inside CATALINA_BASE
within quotes when passing the arguments to the java command line.
4. The problem exists in the latest 5.5 (5.5.25) and 6.0 (6.0.14), but not in 5.0.x.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org