When attempting to deploy the war file in WildFly, a dependency injection ambiguity error is occurring in the HttpServletRequest class.
Is anyone else going through this?
Error returned by WildFly:
Can not upload deployment: {"WFLYCTL0080: Failed services" = > {"jboss.deployment.unit. \" infoconv-proxy-0.0.1-SNAPSHOT.war \ ". WeldStartService" = > "org.jboss.msc.service.StartException in service jboss.deployment.unit. \" infoconv-proxy-0.0.1-SNAPSHOT.war \ "WeldStartService: Failed to start service Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type HttpServletRequest with qualifiers @Default at injection point [BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedMethod] @Default @Produces public br.gov.frameworkdemoiselle.internal.producer.HttpSessionProducer.create (HttpServletRequest) at br.gov.frameworkdemoiselle.internal.producer.HttpSessionProducer.create (HttpSessionProducer.java:53) Possible dependencies: - Producer Method [HttpServletRequest] with qualifiers [@Default @Any] declared as [[BackedAnnotedMethod] @Default @Produces public br.gov.frameworkdemoiselle.internal.producer.HttpServletRequestProducer.create ()], - WELD% AbstractBuiltInBean% infoconv-proxy-0.0.1-SNAPSHOT.war / WEB-INF / lib / demoiselle-servlet-2.5.1.jar% HttpServletRequest "}}
File POM
of the project:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>br.gov.serpro.infoconv</groupId>
<artifactId>infoconv-proxy</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name></name>
<description></description>
<url></url>
<parent>
<groupId>br.gov.frameworkdemoiselle</groupId>
<artifactId>demoiselle-rest-parent</artifactId>
<version>2.5.1</version>
</parent>
<dependencies>
<!-- https://github.com/infoconv/infoconv-ws -->
<dependency>
<groupId>br.gov.serpro.rfb.infoconv.ws</groupId>
<artifactId>infoconv-ws</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<!-- Demoiselle dependencies -->
<!-- <dependency> <groupId>br.gov.frameworkdemoiselle</groupId> <artifactId>demoiselle-jpa</artifactId>
<scope>compile</scope> </dependency> -->
<!-- Uncomment this dependency if you are using a JTA -->
<!-- <dependency> <groupId>br.gov.frameworkdemoiselle</groupId> <artifactId>demoiselle-jta</artifactId>
<scope>compile</scope> </dependency> -->
<!-- Jackson dependencies -->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.9</version>
<scope>provided</scope>
</dependency>
<!-- GZip dependencies -->
<dependency>
<groupId>org.tuckey</groupId>
<artifactId>urlrewritefilter</artifactId>
<version>4.0.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-jaxrs</artifactId>
<version>1.5.4</version>
<!-- <exclusions> <exclusion> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId>
</exclusion> </exclusions> -->
</dependency>
<!-- Tests dependencies -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3.4</version><!--$NO-MVN-MAN-VER$ -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.12.1.GA</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>doclint-java8-disable</id>
<activation>
<jdk>[1.8,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Dependencies>com.jersey.jersey-server,com.jersey.jersey-client,com.jersey.jersey-json</Dependencies>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>component.internal</id>
<name>SERPRO Component Maven Repository</name>
<url>http://archiva.desenv.serpro/repository/component-internal</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
Environment Information:
- JDK: 1.9
- JRE: 1.9
- Server: wildfly-10.0.0.Final
- OS: Windows 10