Tem um projeto no eclipse. Para gerar o war, clico no menu Export, Escolho a opção Web, clico em WAR File.
Clico em Next, Escolho o projeto e depois escolho em qual pasta vai gerar o WAR.
Entrei no administrador do servidor wildfly. fui na aba deployments. Escolhi o WAR gerado e mandei importar. Depois de um tempo ele mostra esta mensagem de erro.
Cannot upload deployment: {“WFLYCTL0080: Failed services” =>
{“jboss.persistenceunit.“des-if-web.war#desif”” =>
“org.jboss.msc.service.StartException in service
jboss.persistenceunit.“des-if-web.war#desif”:
java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast
to org.dom4j.DocumentFactory Caused by: java.lang.ClassCastException:
org.dom4j.DocumentFactory cannot be cast to
org.dom4j.DocumentFactory”},“WFLYCTL0412: Required services that are
not installed:” =>
[“jboss.persistenceunit.“des-if-web.war#desif””],“WFLYCTL0180:
Services with missing/unavailable dependencies” => undefined}
Esta também
Name: Unique identifier of the deployment. Must be unique across
all deployments. Runtime Name: Name by which the deployment should be
known within a server’s runtime. This would be equivalent to the file
name of a deployment file, and would form the basis for such things as
default Java Enterprise Edition application and module names. This
would typically be the same as ‘name’, but in some cases users may
wish to have two deployments with the same ‘runtime-name’ (e.g. two
versions of ‘foo.war’) both available in the deployment content
repository, in which case the deployments would need to have distinct
‘name’ values but would have the same ‘runtime-name’.
Desenvolvimento é wildlfy 8.0
Homologação é 10.0
pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.netsoft</groupId>
<artifactId>des-if-web</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven-compiler-pluging.version>3.2</maven-compiler-pluging.version>
<java.version>1.8</java.version>
<!-- Spring MVC -->
<spring-webmvc.version>4.3.5.RELEASE</spring-webmvc.version>
<!-- Spring security -->
<spring-security.version>4.2.1.RELEASE</spring-security.version>
<!-- Servlet API -->
<servlet.version>3.1.0</servlet.version>
<!-- Logging -->
<log4j.version>2.6</log4j.version>
<jcl-over-slf4j.version>1.7.21</jcl-over-slf4j.version>
<hibernate-validator.version>6.0.8.Final</hibernate-validator.version>
<hibernate-core.version>5.2.14.Final</hibernate-core.version>
<!-- Jackson - JSON -->
<jackson-core.version>2.9.4</jackson-core.version>
<junit.version>4.12</junit.version>
</properties>
<dependencies>
<!-- springframework webmvc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring-webmvc.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
<version>2.0.0.RELEASE</version>
</dependency>
<!-- Spring security -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${spring-security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${spring-security.version}</version>
</dependency>
<!-- Servlet API -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>${servlet.version}</version>
<scope>provided</scope>
</dependency>
<!-- Jackson - JSON -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-core.version}</version>
</dependency>
<!-- Bean Validation / Hibernate Validator -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate-validator.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate-core.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-email</artifactId>
<version>1.5</version>
</dependency>
<!-- Métodos uteis para manipulação de String, métodos e etc -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.7</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.3</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${jcl-over-slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<version>2.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId>
<version>2.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-mqtt</artifactId>
<version>${spring-webmvc.version}</version>
</dependency>
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.9.0</version>
</dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>2.10.4</version>
</dependency>
<dependency>
<groupId>com.twilio.sdk</groupId>
<artifactId>twilio</artifactId>
<version>(7.0,7.9)</version>
</dependency>
<dependency>
<groupId>org.springframework.mobile</groupId>
<artifactId>spring-mobile-device</artifactId>
<version>1.1.5.RELEASE</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>annotations</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-pluging.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
</project>
O que pode ser ?