19:20 <@Betelgeuse> kky: java -version 19:21 < kky> java version "1.4.2-03" but when i've installed tomcat i've downloaded 1.5.... 19:21 < kky> is it the problem ? 19:21 <@Betelgeuse> kky: Yes with USE="java5" you need to set system VM to 1.5 19:22 <@Betelgeuse> kky: or set GENTOO_VM in /etc/conf.d/tomcat-5.5 19:22 < kky> thx The code for checking it is: [[ $(gjl -p tomcat-5.5 --get-vm) ]]
Using [[ is not posix compliant in a init script. Per bug 174498
(In reply to comment #1) > Using [[ is not posix compliant in a init script. > > Per bug 174498 > True. The POSIX version is betelgeuse@pena ~ $ dash test.sh Not valid betelgeuse@pena ~ $ cat test.sh #!/bin/dash export GENTOO_VM="sun-jdk-1.4" [ "$(gjl -p tomcat-5.5 --get-vm)" ] && echo Not valid
Fixed in 5.5.23-r4, closing bug.
(In reply to comment #3) > Fixed in 5.5.23-r4, closing bug. > Thanks.
(In reply to comment #3) > Fixed in 5.5.23-r4, closing bug. > Sorry did not want to make a full patch because I wasn't sure that you were going to use because of that discussion of ours but here are the errors in the version you committed: pena eclass # /etc/init.d/tomcat-5.5 restart tomcat-5.5 | * Caching service dependencies ... [ ok ] tomcat-5.5 | * Stopping Tomcat ... tomcat-5.5 |/etc/init.d/tomcat-5.5: line 8: error: command not found tomcat-5.5 |/etc/init.d/tomcat-5.5: line 9: error: command not found tomcat-5.5 |/etc/init.d/tomcat-5.5: line 10: error: command not found [ ok ] tomcat-5.5 | * Starting Tomcat ... tomcat-5.5 |/etc/init.d/tomcat-5.5: line 8: error: command not found [ !! ] tomcat-5.5 |/etc/init.d/tomcat-5.5: line 9: error: command not found tomcat-5.5 |/etc/init.d/tomcat-5.5: line 10: error: command not found it's called eerror I should have also said that gjl relies on the system VM setting and as such is not valid in 5.5 when the conf.d file uses JAVA_HOME so the conf.d file needs to be changed to use GENTOO_VM.
(In reply to comment #5) > > Sorry did not want to make a full patch because I wasn't sure that you were > going to use because of that discussion of ours Where I also expressed I made recent efforts to close as many Tomcat bugs as possible. but here are the errors in the > version you committed: Typo, left of an e. It's been corrected. > I should have also said that gjl relies on the system VM setting and as such is > not valid in 5.5 when the conf.d file uses JAVA_HOME so the conf.d file needs > to be changed to use GENTOO_VM. That would have been nice to be mentioned. However I had migrated 6.0.x to GENTOO_VM and thought I did 5.5.x when I had to make a new init script and conf.d file. Looks as if I did not, so I just migrated them, and got them in sync with the changes I made to 6.0.x.
(In reply to comment #6) > > That would have been nice to be mentioned. However I had migrated 6.0.x to > GENTOO_VM and thought I did 5.5.x when I had to make a new init script and > conf.d file. Looks as if I did not, so I just migrated them, and got them in > sync with the changes I made to 6.0.x. > Yes. That's what I thought too but had I written the complete patch I would have noticed.