0

I try to make a java 15 maven project of a jaxws webservice using a embedded tomcat 10. My current project is on https://github.com/BeRoots/MeteoWS/tree/master/src/main/java

I'm not sure it's a good idea to make this project using the cargo-maven2-plugin instead of building this project from an Axis2 or CXF Java-First SOAP archtype. But I want to preserve this way if it's acceptable. More informations about this choice are welcome ;)

To explain my actual problem. I have an error when I run maven:build with the error:

SEVERE: Error configuring application listener of class com.sun.xml.ws.transport.http.servlet.WSServletContextListener java.lang.NoClassDefFoundError: jakarta/servlet/ServletContextAttributeListener

If someone have an idea. Thanks in advance

BeRoots
  • 81
  • 12

2 Answers2

1

We just faced the same problem and the solution was adding jakarta.servlet-api to the project:

    <dependency>
        <groupId>jakarta.servlet</groupId>
        <artifactId>jakarta.servlet-api</artifactId>
        <version>5.0.0</version>
    </dependency>
Oscar Pérez
  • 4,377
  • 1
  • 17
  • 36
0

After a lot of searchs. I finally find a good answer about server uses. It explain that tomcat isn't a good server for this kind of project.

Difference between an application server and a servlet container? and enter link description here So I choose to abord this maven project type to recreate a new one using glassfish.

BeRoots
  • 81
  • 12