#1108280 tomcat10: tomcat doesn't use `jakartaee-migration-shaded.jar` when installed

#1108280#5
Date:
2025-06-24 17:09:12 UTC
From:
To:
Dear Maintainer,

I'm trying to setup a webapp (css-validator) with the xml file in
/etc/tomcat10/Catalina/localhost/css-validator.xml

Since the webapp still uses the javax.servlet classes, I made use of

<Loader jakartaConverter="TOMCAT" />

so that tomcat automatically converts the class names from javax.servlet to jakarta.servlet

When restarting tomcat10, it fails with ClassNotFoundException: org.apache.tomcat.jakartaee.EESpecProfile

Jun 24 18:35:15 debian tomcat10[38718]: Caused by:
org.apache.catalina.LifecycleException: Erreur lors du d<C3><A9>marrage du
chargeur
Jun 24 18:35:15 debian tomcat10[38718]:     at
org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:344)
Jun 24 18:35:15 debian tomcat10[38718]:     at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164)
Jun 24 18:35:15 debian tomcat10[38718]:     at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4290)
Jun 24 18:35:15 debian tomcat10[38718]:     at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164)
Jun 24 18:35:15 debian tomcat10[38718]:     at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:599)
Jun 24 18:35:15 debian tomcat10[38718]:     ... 37 more
Jun 24 18:35:15 debian tomcat10[38718]: Caused by:
java.lang.NoClassDefFoundError: org/apache/tomcat/jakartaee/EESpecProfile
Jun 24 18:35:15 debian tomcat10[38718]:     at
org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:322)
Jun 24 18:35:15 debian tomcat10[38718]:     ... 41 more
Jun 24 18:35:15 debian tomcat10[38718]: Caused by:
java.lang.ClassNotFoundException: org.apache.tomcat.jakartaee.EESpecProfile
Jun 24 18:35:15 debian tomcat10[38718]:     at
java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
Jun 24 18:35:15 debian tomcat10[38718]:     at
java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
Jun 24 18:35:15 debian tomcat10[38718]:     at
java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)


So I installed tomcat-jakartaee-migration package which holds the jar
containing the required class.

This is however not sufficient. I finally had to create a symbolic link in
/usr/share/tomcat10/lib to /usr/share/tomcat-jakartaee-migration/lib/jakartaee-
migration-1.0.6-shaded.jar

Shouldn't this be handled automatically by either tomcat package or tomcat-
jakartaee-migration package? How to proceed otherwise?

I suppose there will be the same issue with tomcat11.

Regards
Fab

#1108280#10
Date:
2025-06-25 11:31:44 UTC
From:
To:
An alternative would be to add this value

/usr/share/tomcat-jakartaee-migration/lib/*.jar

to common.loader variable in /etc/tomcat10/catalina.properties

#1108280#15
Date:
2025-07-04 05:32:09 UTC
From:
To:
Hello,

Would you consider these two merge requests? I won't have time to test them though, but applying that change to my /etc/tomcat10/catalina.properties file fixed the issue.

https://salsa.debian.org/java-team/tomcat10/-/merge_requests/2
https://salsa.debian.org/java-team/tomcat11/-/merge_requests/1

You may want to set severity to a higher level so that it can still enter trixie.

Regards
Fab

#1108280#20
Date:
2026-02-16 09:42:37 UTC
From:
To:
Dear Markus,

Gentle ping, as per your message dated 07/10/2025 20:43 where you suggested to start with tomcat.

Regards
Fab