This will probably come from a dependency.
One source can be logback, you have to use 1.4.x or 1.5.x (see
https://logback.qos.ch/news.html). Logback 1.3 has a
javax.servlet.ServletContainerInitializer, which in fact loads a javax
dependency.

Check your dependencies, they might have a file in the jar in the
META-INF/services/<whateverfilename>. You can try to put a breakpoint in
the error and go up in the stack to see who is loading this class.







On Wed, Jul 24, 2024 at 12:55 PM COURTAULT Francois
<francois.courta...@thalesgroup.com.invalid> wrote:

> THALES GROUP LIMITED DISTRIBUTION to email recipients
>
> Hello,
>
> One of our teams is migrating an application using TomEE 8.0.16 to 9.1.3.
> Unfortunately, they get this:
> org.apache.tomcat.util.digester.Digester.startElement Begin event threw
> exception
>         java.lang.NoClassDefFoundError:
> javax/servlet/http/HttpServletResponse
>                 at
> java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
>                 at
> java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3373)
>
> Of course the application code has been updated in order to replace javax
> packages to jakarta packages.
> The libraries used have also been updated to be compatible to Jakarta 9.1.
>
> Any idea where this issue comes from ?
>
> Best Regards.
>
>
>
>

Reply via email to