Description of problem: In /etc/tomcat6/tomcat6.conf, JAVA_HOME is set to: JAVA_HOME="/usr/lib/jvm/java-1.6.0" But this is only present if the JDK (e.g. java-1.6.0-openjdk-devel) is installed, which is not explicitly requires by tomcat6. With this setting: # JAVA_HOME=/usr/lib/jvm/java-1.6.0 build-classpath commons-daemon /usr/bin/build-classpath: error: JVM_LIBDIR /usr/lib/jvm-exports/java-1.6.0 does not exist or is not a directory which gets inserted into the classpath: /usr/bin/java -Xms512m -Xmx1024m -XX:MaxPermSize=256m -classpath :/usr/share/tomcat6/bin/bootstrap.jar:/usr/share/tomcat6/bin/tomcat-juli.jar:/usr/bin/build-classpath: error: JVM_LIBDIR /usr/lib/jvm-exports/java-1.6.0 does not exist or is not a directory -Dcatalina.base=/usr/share/tomcat6 -Dcatalina.home=/usr/share/tomcat6 -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat6/temp -Djava.util.logging.config.file=/usr/share/tomcat6/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.Bootstrap start If you don't really need the JDK, but want Java 1.6.0, I think you want: JAVA_HOME=/usr/lib/jvm/jre-1.6.0 Version-Release number of selected component (if applicable): tomcat6-6.0.26-8.fc14.noarch
I think it should be '/usr/lib/jvm/java' to comply with alternatives, right?
Nope, alternatives provides version specific links in /usr/lib/jvm as well. We want a 1.6.0 jvm, question is do we need a JDK or a JRE, and I'm arguing you want the latter.
I hit the same issue with JAVA_HOME when debugging tomcat6 start up in F15. I believe the current setting in /etc/tomcat6/tomcat6.conf is wrong. I think there is a consensus this is wrong. Now what should it be? I believe it should be: /usr/lib/jvm/jre The reason I believe this is correct value is because you want JRE, not JVM. I think this might have been what Orion in comment #2 was referring to as well. I believe you want JAVA_HOME to be a run time environment (e.g. JRE) and not a SDK (which is what /usr/lib/jvm/java-1.6.0 points to). Also note that SDK link (/usr/lib/jvm/java-1.6.0) is only provided by the -devel package, devel is not a generic runtime environment. /usr/lib/jvm/jre is a link managed by alternatives to the preferred JRE (preferred java implementation and preferred implementation version). I believe this is what is desired and the intention behind the alternatives configuration. Any comments on my reasoning?
I am not an expert on how we package Java components and how various elements are intended to be used, I can only draw conclusions from limited pieces of information. I'd like to have a Java packaging expert review the suggestion in comment #3. We really want to make sure it's right this time and not iterate making educated guesses. I'm going to try and find someone to review and sanity check my suggestion.
/usr/lib/jvm/jre-1.6.0 seems to satisfy both John's and Orion's concerns, no?
With respect to comment #2 and comment #5, why should the jre be explicitly versioned?
Seems like a valid question to me. I am not an expert in tomcat or packaging, but I do see that there is not a specific version required in the tomcat6 specfile. Why then should some specific version be used in config? Either the spec should require version, or the config should specify the versionless jre directory for JAVA_HOME. (since comment #2 suggests that 1.6 version is wanted, then I am inclined to suggest that the specfile is what should change here, and I also see that minimum version has been specified in requires for tomcat [7?] package).
tomcat6-6.0.26-27.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/tomcat6-6.0.26-27.fc14
Package tomcat6-6.0.26-27.fc14: * should fix your issue, * was pushed to the Fedora 14 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing tomcat6-6.0.26-27.fc14' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/tomcat6-6.0.26-27.fc14 then log in and leave karma (feedback).
tomcat6-6.0.26-27.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.