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
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With