Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

javax.servlet.HttpConstraintElement"'s signer information does not match signer information of other classes in the same package

Tags:

maven-2

maven

I've an exception in my maven project:

class "javax.servlet.HttpConstraintElement"'s signer information does not match signer information of other classes in the same package

Question:

How to resolve this problem?

PS:

As I understand, I use two jars, both contains HttpConstraintElement. And those maven dependencies have two different versions. So I tried to:

$ mvn dependency:tree -Dverbose |grep servlet
[INFO] +- javax.servlet:servlet-api:jar:2.5:compile
[INFO] +- javax.servlet.jsp:jsp-api:jar:2.2:compile
[INFO] +- javax.servlet:jstl:jar:1.2:compile
[INFO] |  +- org.apache.tiles:tiles-servlet-wildcard:jar:2.2.2:compile
[INFO] |  |  +- (org.apache.tiles:tiles-servlet:jar:2.2.2:compile - omitted for duplicate)
[INFO] |  |  +- (org.apache.tiles:tiles-servlet:jar:2.2.2:compile - omitted for duplicate)
[INFO] |  |  +- (org.apache.tiles:tiles-servlet:jar:2.2.2:compile - omitted for duplicate)
[INFO] +- org.apache.tiles:tiles-servlet:jar:2.2.2:compile
[INFO] |  +- (org.apache.tiles:tiles-servlet:jar:2.2.2:compile - omitted for duplicate)
[INFO]    \- org.eclipse.jetty:jetty-servlet:jar:9.0.0.M4:compile
[INFO]             +- org.eclipse.jetty.orbit:javax.servlet:jar:3.0.0.v201112011016:compile
like image 682
VB_ Avatar asked Sep 17 '13 11:09

VB_


1 Answers

This answer worked for me, using Servlet API 3.0.

The solution was to take the explicit dependency on servlet-api, and change it from provided to compile scope.

    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.0.1</version>
        <scope>compile</scope>
    </dependency>
like image 182
Adrian Cox Avatar answered Oct 03 '22 06:10

Adrian Cox