Re: Problem running TC 6.0.18 with CATALINA_BASE

2008-10-14 Thread Rainer Jung
Christopher Schultz schrieb:
 So, this appears to be my problem, but two things confuse me:
 
 1. The command-line looks just fine to me in the first place.
 and

The startup script contains some $variable and variable is empty if
there is no logging.properties. The shell then gives an empty arg to the
JVM, which does not tolerate this. You can see the same effect with

  java  -version

 2. TC 5.5.26 is working without a problem.

The problem was introduced, because in order to allow paths with spaces
in them, a lot of quotation marks were added to the startup script, and
that's what made the difference. An empty variable without quotation
marks is just stripped by the shell, one with quotation marks is an
empty argument.

Regards,

Rainer

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem running TC 6.0.18 with CATALINA_BASE

2008-10-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rainer,

Rainer Jung wrote:
 Christopher Schultz schrieb:
 So, this appears to be my problem, but two things confuse me:

 1. The command-line looks just fine to me in the first place.
 and
 
 The startup script contains some $variable and variable is empty if
 there is no logging.properties. The shell then gives an empty arg to the
 JVM, which does not tolerate this. You can see the same effect with
 
   java  -version


Aah, that makes sense. When using 'echo', you don't notice that there's
a hidden, empty argument.

Thanks for clearing that up.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkj0+tcACgkQ9CaO5/Lv0PDJdwCfVgB01Jj9k9td8+EZioWhzUBn
VvAAn2OVJwE0I/Ey0++TMi7ph2JahuZM
=73VD
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem running TC 6.0.18 with CATALINA_BASE

2008-10-13 Thread Pavel Savara
The fix is http://svn.apache.org/viewvc?view=revrevision=685715
The catalina.sh change is the only one you need to apply.
Pavel

On Fri, 2008-10-10 at 15:16 -0400, Christopher Schultz wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 All,
 
 I've been running multiple TC 4.1 and 5.5 instances using CATALINA_BASE
 for years, and I'm starting to play with TC 6.x. I use ant to run
 bin/startup.sh (actually, I usually go right for catalina.sh start,
 but I went to using startup.sh just to simplify things a bit) and it
 does not seem to be working for me.
 
 Here are the steps I went through:
 
 0. I'm using Sun JDK 1.5.0_13-b05 on Gentoo Linux kernel 2.6.
 
 1. Installed the tar.gz version of TC 6.0.18 directly from the TC site
(installed into /usr/local/apache-tomcat-6.0.18)
 
 2. Created a deployment directory (/home/chris/app/connector-test/8785)
and installed the following directories and files:
 /home/chris/app/connector-test/
 /home/chris/app/connector-test/8785
 /home/chris/app/connector-test/8785/conf
 /home/chris/app/connector-test/8785/conf/web.xml
 /home/chris/app/connector-test/8785/conf/server.xml
 /home/chris/app/connector-test/8785/webapps
 /home/chris/app/connector-test/8785/logs
 /home/chris/app/connector-test/8785/temp
 
 web.xml and server.xml are identical to the config files from the
 distro. All files and directories are owned and writable/executable by
 the user who will be launching Tomcat.
 
 3. Started tomcat using my ant tomcat-start target:
 
 echo===
 Starting Tomcat
 ===
 JAVA_HOME is ${app.java-home}
 CATALINA_BASE is ${app.home.dir}
 /echo
 
 exec os=Linux executable=${app.tomcat-home}/bin/startup.sh
   env key=JAVA_HOME value=${app.java-home} /
   env key=CATALINA_BASE value=${app.home.dir} /
 /exec
 
 I added some 'echo' statements to catalina.sh to display the command
 ultimately being run, and this is the output:
 
 tomcat-start:
  [echo] ===
  [echo] Starting Tomcat
  [echo] ===
  [echo] JAVA_HOME is /usr
  [echo] CATALINA_BASE is /home/chris/app/connector-test/8785
  [exec] running command: /usr/bin/java
 - -Djava.endorsed.dirs=/usr/local/apache-tomcat-6.0.18/endorsed -classpath
 :/usr/local/apache-tomcat-6.0.18/bin/bootstrap.jar
 - -Dcatalina.base=/home/chris/app/connector-test/8785
 - -Dcatalina.home=/usr/local/apache-tomcat-6.0.18
 - -Djava.io.tmpdir=/home/chris/app/connector-test/8785/temp
 org.apache.catalina.startup.Bootstrap start 
 /home/chris/app/connector-test/8785/logs/catalina.out 21 
 
 BUILD SUCCESSFUL
 Total time: 1 second
 
 All the paths are correct and the command looks good to me.
 
 The result is that I get this and only this in
 /home/chris/app/connector-test/8785/logs/catalina.out:
 Exception in thread main java.lang.NoClassDefFoundError:
 
 That's right: no exception stack trace. No nothing. Just that one line
 of output, and the process dies.
 
 When running directly from the deployment directory (i.e. NOT using
 CATALINA_BASE), startup works as expected. Here is the output from the
 standard launch:
 Using CATALINA_BASE:   /usr/local/apache-tomcat-6.0.18
 Using CATALINA_HOME:   /usr/local/apache-tomcat-6.0.18
 Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.18/temp
 Using JRE_HOME:   /etc/java-config-2/current-system-vm
 running command: /etc/java-config-2/current-system-vm/bin/java
 - -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 -
 -Djava.util.logging.config.file=/usr/local/apache-tomcat-6.0.18/conf/logging.properties
 - -Djava.endorsed.dirs=/usr/local/apache-tomcat-6.0.18/endorsed -classpath
 :/usr/local/apache-tomcat-6.0.18/bin/bootstrap.jar
 - -Dcatalina.base=/usr/local/apache-tomcat-6.0.18
 - -Dcatalina.home=/usr/local/apache-tomcat-6.0.18
 - -Djava.io.tmpdir=/usr/local/apache-tomcat-6.0.18/temp
 org.apache.catalina.startup.Bootstrap start 
 /usr/local/apache-tomcat-6.0.18/logs/catalina.out 21 
 
 Obviously there are some differences, here. First, JAVA_HOME is set
 differently, but that does not seem to be a problem since they actually
 point to the same place (Gentoo has some very configurable Java
 installation options).
 
 Also, the logging configuration looks different. catalina.sh sniffs for
 $CATALINA_BASE/conf/logging.properties and adds configuration as
 necessary. Since I have no logging.properties, this is also no surprise.
 
 catalina.base, catalina.home, and the classpath all look correct and
 there appear to be no obvious problems.
 
 Does anyone have any suggestions?
 
 Thanks,
 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
 iEYEARECAAYFAkjvqhcACgkQ9CaO5/Lv0PDiEQCeMptOzf9KLvvxplUQin1TBAq8
 N10An3gvFy7bIgIetrMS6Wi0dRamjRHd
 =ihJl
 -END PGP SIGNATURE-
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, 

Re: Problem running TC 6.0.18 with CATALINA_BASE

2008-10-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Pavel and Konstantin,

Thanks for the references. This appears to be exactly what's happening
to me. I'll patch catalina.sh and re-try.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjzXwwACgkQ9CaO5/Lv0PDvnQCeLiCXK43yKm0N1Sos2PGao1dS
/2IAn3d6XT4Wi6wy5D9SZQfUO0pQ2Uu4
=SJes
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem running TC 6.0.18 with CATALINA_BASE

2008-10-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Konstantin,

Konstantin Kolinko wrote:
 2008/10/10 Christopher Schultz [EMAIL PROTECTED]:
 (..)
 The result is that I get this and only this in
 /home/chris/app/connector-test/8785/logs/catalina.out:
 Exception in thread main java.lang.NoClassDefFoundError:

 
 It is a known issue with 6.0.18, see
 https://issues.apache.org/bugzilla/show_bug.cgi?id=45585

Hmm... this claims to be fixed in 5.5.27 and later, and it's working
for me on 5.5.26 with no conf/logging.properties.

I did copy $CATALINA_HOME/conf/logging.properties to
$CATALINA_BASE/conf/logging.properties and it appears to work. New
command line is:

/etc/java-config-2/current-system-vm/bin/java
- -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-
-Djava.util.logging.config.file=/home/chris/app/connector-test/8785/conf/logging.properties
- -Djava.endorsed.dirs=/usr/local/apache-tomcat-6.0.18/endorsed -classpath
:/usr/local/apache-tomcat-6.0.18/bin/bootstrap.jar
- -Dcatalina.base=/home/chris/app/connector-test/8785
- -Dcatalina.home=/usr/local/apache-tomcat-6.0.18
- -Djava.io.tmpdir=/home/chris/app/connector-test/8785/temp
org.apache.catalina.startup.Bootstrap start 
/home/chris/app/connector-test/8785/logs/catalina.out 21 

I also confirmed that removing $CATALINA_BASE/conf/logging.properties
and setting LOGGING_CONFIG=-Dnop results in success with the following
command line:

/etc/java-config-2/current-system-vm/bin/java -Dnop
- -Djava.endorsed.dirs=/usr/local/apache-tomcat-6.0.18/endorsed -classpath
:/usr/local/apache-tomcat-6.0.18/bin/bootstrap.jar
- -Dcatalina.base=/home/chris/app/connector-test/8785
- -Dcatalina.home=/usr/local/apache-tomcat-6.0.18
- -Djava.io.tmpdir=/home/chris/app/connector-test/8785/temp
org.apache.catalina.startup.Bootstrap start 
/home/chris/app/connector-test/8785/logs/catalina.out 21 

So, this appears to be my problem, but two things confuse me:

1. The command-line looks just fine to me in the first place.
and
2. TC 5.5.26 is working without a problem.

shrug

I'm happy enough to have it working. Thanks!

 The message with no class name is caused by passing an
 empty argument to /usr/bin/java.

The command-line I posted appears to be valid, including
org.apache.catalina.startup.Bootstrap as the startup class.

 Also, you are missing /work subdirectory in your ${catalina.base}. Maybe
 it is auto-created, but just in case.

Yes, TC auto-creates the work subdirectory.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjzaZIACgkQ9CaO5/Lv0PD+YgCfRzeSMkMHZ9UP65YH5rZELAnc
EuYAnihL8kJ49P/mjO4TSlUClUVSeZ2+
=MK1l
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem running TC 6.0.18 with CATALINA_BASE

2008-10-10 Thread Konstantin Kolinko
2008/10/10 Christopher Schultz [EMAIL PROTECTED]:
 (..)
 The result is that I get this and only this in
 /home/chris/app/connector-test/8785/logs/catalina.out:
 Exception in thread main java.lang.NoClassDefFoundError:


It is a known issue with 6.0.18, see
https://issues.apache.org/bugzilla/show_bug.cgi?id=45585

The message with no class name is caused by passing an
empty argument to /usr/bin/java.

Also, you are missing /work subdirectory in your ${catalina.base}. Maybe
it is auto-created, but just in case.

Best regards,
Konstantin Kolinko

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]