FS#15417 - [tomcat] rc.d script points to openjdk

Attached to Project: Arch Linux
Opened by Hannes Lemberg (hannesl) - Monday, 06 July 2009, 20:31 GMT
Last edited by Paul Mattal (paul) - Saturday, 06 March 2010, 23:26 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Paul Mattal (paul)
Andreas Radke (AndyRTR)
Hugo Doria (hdoria)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

The Tomcat rc.d script needs the openjdk 1.6 installed, even if it doesn't depend on it.

Now it's something like this:
/opt/tomcat/bin/jsvc \
-user tomcat \
-->> -home /usr/lib/jvm/java-1.6.0-openjdk \
-Dcatalina.home=/opt/tomcat \
-Dcatalina.base=/opt/tomcat \
-Djava.io.tmpdir=/opt/tomcat/temp \
-wait 10 \
-pidfile /var/run/tomcat.pid \
-errfile /opt/tomcat/logs/catalina.log \
$CATALINA_OPTS \
-->> -cp /usr/lib/jvm/java-1.6.0-openjdk/lib/tools.jar:/opt/tomcat/bin/commons-daemon.jar:/opt/tomcat/bin/bootstrap.jar \
org.apache.catalina.startup.Bootstrap

But it should be similar to this:

/opt/tomcat/bin/jsvc \
-user tomcat \
-->> -home $JAVA_HOME \
-Dcatalina.home=/opt/tomcat \
-Dcatalina.base=/opt/tomcat \
-Djava.io.tmpdir=/opt/tomcat/temp \
-wait 10 \
-pidfile /var/run/tomcat.pid \
-errfile /opt/tomcat/logs/catalina.log \
$CATALINA_OPTS \
-->> -cp $JAVA_HOME/lib/tools.jar:/opt/tomcat/bin/commons-daemon.jar:/opt/tomcat/bin/bootstrap.jar \
org.apache.catalina.startup.Bootstrap
This task depends upon

Closed by  Paul Mattal (paul)
Saturday, 06 March 2010, 23:26 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in tomcat 5.5.28-2 in extra for both arches.
Comment by Jan de Groot (JGC) - Monday, 06 July 2009, 20:58 GMT
I don't think $JAVA_HOME is known on system bootup yet, but I think this should be set from a /etc/default/tomcat script or something. Debian uses that file to specify the JDK and the java startup options.
Comment by Hannes Lemberg (hannesl) - Monday, 06 July 2009, 21:09 GMT
Maybe in /etc/conf.d/tomcat? This file is included in the startup script.
Comment by Jens Hornung (yentz) - Tuesday, 04 August 2009, 20:58 GMT
If installed jdk or jre $JAVA_HOME is set with the script jdk.sh or jre.sh in /etc/profile.d.
Comment by Wil Saint (dyrne) - Friday, 25 September 2009, 14:56 GMT
This is a more immediate problem since the current openjdk6 package installs to /usr/lib/jvm/java-6-openjdk and the rc.d/ script places -home in /usr/lib/jvm/java-1.6.0-openjdk. In other words the default tomcat rc.d script is presently broken you have to change the -home value.
Comment by Andreas Radke (AndyRTR) - Saturday, 30 January 2010, 17:00 GMT
the tomcat rc.d script is fixed to work with openjdk6. people using something not officially supported package from community/AUR or wherever should know what they do. I don't see a simple generic fix.
Comment by Paul Mattal (paul) - Saturday, 06 March 2010, 21:54 GMT
This seems like the kind of thing that could be easily be broken out in a /etc/conf.d/tomcat file so that it could be easily configured on a permanent basis if needed, but still default to pointing at openjdk.

Unless the maintainer objects to this sort of fix, I'll look into that in the next couple of weeks.

Loading...