2
When trying to deploy the War file in Wildfly, there is a dependency injection ambiguity error in the Httpservletrequest class.
Someone else is going through it or has been through it?
Error returned by Wildfly:
Cannot 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 ". Starweldtservice: 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 [[Backedannotatedmethod] @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 "}}
Filing cabinet 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>
Environmental information:
- JDK: 1.9
- JRE: 1.9
- Server: wildfly-10.0.0.Final
- OS: Windows 10
@Gustavo, Demoiselle follows JEE6 specification and Wildfly 8 follows JEE7 specification, this may be related to the error. I will install Jboss 7.1.1 and JDK 1.7 and try to deploy.
– Cesar Draw