Summary: | www-client/tomcat: wrong classpath prevents startup (java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Robert G. Siebeck <gentoo.2019> |
Component: | Current packages | Assignee: | Java team <java> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | fordfrog |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/gentoo/gentoo/pull/16916 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Robert G. Siebeck
2020-07-31 13:01:16 UTC
See also the following discussion: https://forums.gentoo.org/viewtopic-p-8486250.html package.env is correct, it also contains DEPEND="eclipse-ecj-4.5:tomcat-servlet-api-3.1" which pulls in the jars. the problem is that you are attempting to run tomcat using startup.sh which is not supported on gentoo. the correct way to set up a tomcat instance and run it is to use /usr/share/tomcat-8.5/gentoo/tomcat-instance-manager.bash and then use the created init.d script. here is the output of the instance manager help: # /usr/share/tomcat-8.5/gentoo/tomcat-instance-manager.bash No action specified! Usage: /usr/share/tomcat-8.5/gentoo/tomcat-instance-manager.bash <--create|--remove|--help> [--suffix s][--user u][--group g] Options: --help: show this text. --create: create a new instance --remove: remove an existing instance. --suffix SUFFIX: a suffix for this instance. the suffix may not collide with an already existing instance, defaults to empty. --user USER: the user for which to configure this instance for. The user needs to exist already. defaults to tomcat. --group GROUP: the group for which to configure this instance for. The group needs to exist already. defaults to tomcat. Examples: /usr/share/tomcat-8.5/gentoo/tomcat-instance-manager.bash --create --suffix testing --user tacmot --group tacmot /usr/share/tomcat-8.5/gentoo/tomcat-instance-manager.bash --remove --suffix testing Please consider some IDEs depend on catalina.sh to run Tomcat for local development. That was why I originally stumbled across this issue. I acknowledge package.env is correct, but catalina.sh doesn't read the whole classpath from it (missing the dependencies). My proposed patch just fixes that. I don't see anything against fixing catalina.sh, even though it's not officially supported. What do you think? ok, this is a valid reason. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a28532a65d5975ac732ec7e8fa107a297bfb677d commit a28532a65d5975ac732ec7e8fa107a297bfb677d Author: Robert Siebeck <gentoo.2019@r123.de> AuthorDate: 2020-07-31 13:06:39 +0000 Commit: Miroslav Šulc <fordfrog@gentoo.org> CommitDate: 2020-08-07 07:51:01 +0000 www-server/tomcat: fix missing dependencies in classpath in catalina.sh Closes: https://bugs.gentoo.org/734948 Signed-off-by: Robert Siebeck <gentoo.2019@r123.de> Closes: https://github.com/gentoo/gentoo/pull/16916 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org> www-servers/tomcat/tomcat-7.0.105-r1.ebuild | 146 ++++++++++++++++++++++ www-servers/tomcat/tomcat-8.5.57-r1.ebuild | 163 ++++++++++++++++++++++++ www-servers/tomcat/tomcat-9.0.37-r1.ebuild | 187 ++++++++++++++++++++++++++++ 3 files changed, 496 insertions(+) |