Summary: | New Tomcat init script does not respect catalina.properties | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jérôme Revillard <jerome.revillard> |
Component: | [OLD] Java | Assignee: | Java team <java> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | marco.dr |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Jérôme Revillard
2013-01-09 08:39:19 UTC
(In reply to comment #0) [snip] > But in fact, with the new init script, the common classpath is generated > from the output of: > > [code]CLASSPATH=`java-config --classpath > tomcat-6${TOMCAT_EXTRA_JARS:+,${TOMCAT_EXTRA_JARS}}`[/code] The the global classpath consists of: - the jars absolutely required - the system packages listed in TOMCAT_EXTRA_JARS - an arbitrary path in TOMCAT_EXTRA_CLASSPATH TOMCAT_EXTRA_JARS isn't required but is more convenient than TOMCAT_EXTRA_CLASSPATH and may avoid an additional call to java-config. > I think this is not good. We need to add many jars and configuration files > in the '${catalina.base}/lib' in order to make our application working and > the only way I found to do that is to add the following line in the > /etc/conf.d/tomat-6 file: > > [code]TOMCAT_EXTRA_CLASSPATH="$(ls -d -1 /usr/share/tomcat-6/lib/*.jar |tr > '\n' ':')/usr/share/tomcat-6/lib"[/code] > The package manager wont install any jar or class files there without recording them properly. So your value of TOMCAT_EXTRA_CLASSPATH should be meaningless unless you put stuff there manually, which I wouldn't recommend. Just let the jars and classes in their natural place and construct TOMCAT_EXTRA_CLASSPATH accordingly. Java 6 and later also support wildcards. So TOMCAT_EXTRA_CLASSPATH="/home/sera/random_jars/*:/home/sera/random_classes" would be admittedly an extreme but valid example. If you want to put them all in one place '${catalina.base}/lib' sounds about right. > Wouldn't it be good to respect the Tomcat configuration files ? We do, supposedly. Did you edit the one in CATALINA_HOME/conf instead of the one in CATALINA_BASE/conf? CATALINA_BASE/conf is a symlink to /etc/<qualified instance name>/ I believe sera was right and we've reworked the init scripts to respect Tomcat's class loader now instead of relying on the system classpath. Closing. |