Jersey project startup error Mapping conflict
Bonjour,
Qu'est-ce que cette erreur signifie quand il fait son apparition lors du démarrage de l'application ?
Code:
1 2 3 4 5 6 7 8 9
| INFOS: Starting Servlet Engine: Apache Tomcat/7.0.39
août 02, 2016 5:45:19 PM com.sun.jersey.server.impl.container.servlet.JerseyServletContainerInitializer addServletWithApplication
GRAVE: Mapping conflict. A Servlet declaration exists with same mapping as the Jersey servlet application, named com.cortez.samples.javaee7angular.rest.PersonResource, at the servlet mapping, /resources/*. The Jersey servlet is not deployed.
août 02, 2016 5:45:19 PM com.sun.jersey.api.core.PackagesResourceConfig init
INFOS: Scanning for root resource and provider classes in the packages:
com.cortez.samples.javaee7angular.rest
août 02, 2016 5:45:19 PM com.sun.jersey.api.core.ScanningResourceConfig logClasses
INFOS: Root resource classes found:
class com.cortez.samples.javaee7angular.rest.PersonResource |
sachant que le web.xml :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>javaee7-angular-rest</display-name>
<servlet>
<servlet-name>angular_jersey_rest</servlet-name>
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>com.cortez.samples.javaee7angular.rest</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>angular_jersey_rest</servlet-name>
<url-pattern>/resources/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app> |
Cordialement