Bug 1126439 - tomcat - catalina-tasks.xml references missing servlet-api.jar
Summary: tomcat - catalina-tasks.xml references missing servlet-api.jar
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: tomcat
Version: 20
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Ivan Afonichev
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-04 12:54 UTC by James Le Cuirot
Modified: 2014-09-26 09:02 UTC (History)
2 users (show)

Fixed In Version: tomcat-7.0.52-1.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-26 09:02:21 UTC


Attachments (Terms of Use)

Description James Le Cuirot 2014-08-04 12:54:54 UTC
/usr/share/tomcat/bin/catalina-tasks.xml requires ${catalina.home}/lib/servlet-api.jar but /usr/share/tomcat/lib/servlet-api.jar is not present. This results in the following error.


jlecuirot@red ~ $ ant -f /usr/share/tomcat/bin/catalina-tasks.xml 
Buildfile: /usr/share/tomcat/bin/catalina-tasks.xml
Trying to override old definition of datatype resources

BUILD FAILED
/usr/share/tomcat/bin/catalina-tasks.xml:28: typedef A class needed by class org.apache.jasper.JspC cannot be found: javax/servlet/ServletException
 using the classloader AntClassLoader[/usr/share/tomcat/bin/tomcat-juli.jar:/usr/share/tomcat/lib/tomcat-api.jar:/usr/share/tomcat/lib/tomcat-util.jar:/usr/share/tomcat/lib/jasper.jar:/usr/share/tomcat/lib/jasper-el.jar:/usr/share/tomcat/lib/catalina-ant.jar:/usr/share/tomcat/lib/tomcat-coyote.jar]

Total time: 0 seconds


/usr/share/tomcat/lib/tomcat-servlet-3.0-api.jar is present and I know there is a servlet "alternative" but it is not creating a necessary symlink. If I manually create a symlink and retry, I get this.


jlecuirot@red ~ $ ant -f /usr/share/tomcat/bin/catalina-tasks.xml 
Buildfile: /usr/share/tomcat/bin/catalina-tasks.xml
Trying to override old definition of datatype resources

BUILD SUCCESSFUL
Total time: 0 seconds


I have observed this with tomcat-7.0.47-1.fc20 and tomcat-servlet-3.0-api-7.0.47-1.fc20 but I believe the problem still exists in Rawhide. The following lines from the RPM spec are particularly noteworthy.


%{__mv} %{name}/servlet-api.jar %{name}-servlet-%{servletspec}-api.jar
%{__ln_s} %{name}-servlet-%{servletspec}-api.jar %{name}-servlet-api.jar

Comment 1 Ivan Afonichev 2014-08-04 20:54:38 UTC
I'am not sure if it can affect something if at the same tomcat shared lib path ( /usr/share/tomcat/lib/ ) there would be both tomcat-servlet-3.0-api.jar and servlet.jar
java can consider such situation as package conflict...
Maybe the best way would be to patch catalina-tasks.xml

Comment 2 James Le Cuirot 2014-08-05 08:40:49 UTC
Given that /usr/share/tomcat/lib/tomcat-servlet-3.0-api.jar is a symlink, wouldn't it be better to just rename that to servlet-api.jar as Tomcat expects?

Comment 3 Ivan Afonichev 2014-08-05 10:24:03 UTC
Other libs listed in catalina-tasks.xml also have another names. I think there was some reason to give them other names, not as in upstream.

Comment 4 James Le Cuirot 2014-08-05 10:34:16 UTC
Well I don't really mind, please do what you think is best.

Comment 5 Fedora Update System 2014-09-16 21:36:46 UTC
tomcat-7.0.52-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/tomcat-7.0.52-1.fc20

Comment 6 Fedora Update System 2014-09-19 10:13:39 UTC
Package tomcat-7.0.52-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing tomcat-7.0.52-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-11048/tomcat-7.0.52-1.fc20
then log in and leave karma (feedback).

Comment 7 James Le Cuirot 2014-09-25 10:11:26 UTC
Works for me, thanks. Karma left.

Comment 8 Fedora Update System 2014-09-26 09:02:21 UTC
tomcat-7.0.52-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.