Bug#644340: tomcat7: action "start" failed: no JDK found - please set JAVA_HOME

James Page james.page at ubuntu.com
Thu Oct 6 07:54:38 UTC 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 04/10/11 23:56, Miguel Landaeta wrote:
> root at alice:/# invoke-rc.d tomcat7 start no JDK found - please set
> JAVA_HOME ... failed! invoke-rc.d: initscript tomcat7, action
> "start" failed. root at alice:/#
> 
> The recent changes in openjdk-6 that enable support for multi-arch 
> break default configuration of tomcat7.
> 
> Since JAVA_HOME is not set by default, tomcat7 looks for these
> paths as JAVA_HOME candidates:
> 
> JDK_DIRS="/usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun
> /usr/lib/jvm/java-1.5.0-sun /usr/lib/j2sdk1.5-sun
> /usr/lib/j2sdk1.5-ibm"
> 
> In a clean chroot with openjdk-6-jre 6b23~pre10-1 none of those
> paths are valid.
> 
> I'm not sure how to fix this, my questions are:
> 
> Should I add /usr/lib/jvm/java-6-openjdk-$(dpkg-architecture
> -qDEB_HOST_ARCH) to JDK_DIRS list?
> 
> Or should I just add /usr/lib/jvm/default-java to that list?
> 
> Thanks,

I think that this highlights a couple of issues:

1) The long term future of the sun jre/jdk in Debian - if and when it
gets removed from non-free then quite a few of those paths are going
to be obsolete.

2) The fact that none of the tomcat7 packages actually depend on a
java runtime environment - it actually gets pulled in by
libcommons-dbcp-java which is not right (can't believe I've not
noticed that before...)

I think we should introduce a dependency on default-jre-headless |
java-5-runtime | java-6-runtime in tomcat7-common and switch to using
/usr/lib/jvm/default-java.  That way we are saying that this is the
supported/tested jre from Debian.

If someone wants to download a different JRE/JDK from Oracle thats
fine - and we should let them set an appropriate JAVA_HOME through
/etc/default/tomcat7 is they want to go down this route - it looks
like this is already supported in the package and overrides JDK_DIRS.

The above also applies to the tomcat6 package.

Cheers

James

- -- 
James Page
Ubuntu Server Developer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBCAAGBQJOjV66AAoJEL/srsug59jDua8P+wYnZk28Uxhoc+TpJdOfF9zQ
uhu7QaBCCa7QqzYQUTTkpeRGLmBxOGkmaF1s4TDPK3dCGfftBDhMnVJ/jak9zoUp
9Nt0RmGiqqzjsYIyvUoH2KowRat+Q5axJXKlK7vTZaC5NLbb8IvX5kraG9oEw0RT
eYjd2u8bRbGejemqqTqqkDo1J2p8Q3Pvpu4HkRUM7KJejtTNKx2ZzamX2t5QzMmb
YyGSmvq3LF5nbzoJZ7ZHs4r8unQVEYjccZj4LVAR08GoEABzpFfKHiZ+kGi8UqGa
LObsFjV99/GnZR3q3+dP1yNy0JPzfUF4kW9gs4HSAnkW8UsPq+SRJfQtH0CyW+KF
MK5qJDs+XEh60XJCGeIPU3cQl4br1wFZ3xbr7tombVycNa27plozcBVuWzV5yGI4
cZldQ+XR0WV5c8WdpS8JWz/b90TzKx7GGnOZSbrVIOA5ao6Tpc/18e2OsI1sz73H
2fdGxaA7s4/c+T/KVuNkcw249EY9ae9dN3+geseDJqZaOMqGcR0B3nVenHx00Jqg
+LqRWb87/lL6s/zDyEpuXP4cQXtm40ujYKp1k9lDqyHhUYNhgn6HxWZgO8XxJUH1
GfKl+FLy5zac8BsaNBnbX1k6yp5Zaqy3U+L6WWrSYBzu9eK/YPVTMAJZeTpBTat4
5/9QESvmeaa9ewclcRFn
=7EDU
-----END PGP SIGNATURE-----





More information about the pkg-java-maintainers mailing list