Olá pessoal tudo bem tenho um projeto maven usando JSF 2.2 JPA/Hibernate CDI rodando de boa no tomcat 8, isso devido ao fato de ter as dependências do mojarra primefaces 5.3 weld dentre outras já especificadas no pom.xml, porém quando fui rodar o projeto no wildfly 10 o projeto não sobe da erro, já imaginei de cara que era devido ao fato do wildfly 10 já disponibilizar pra mim o weld mojarra entre outras coisas ai comecei a retirar essas dependências do pom.xml e mesmo assim o projeto não sobe, então o problema provavelmente deve ser a maneira que devo lidar com essas dependências no meu pom.xml para ele reconhecer as do wildfly, alguém poderia me disponibilizar por exemplo um arquivo pom.xml funcional que use essas tecnologias e que rode no wildfly 10?
outro problema que dá quando vai subir o servidor é o seguinte erro mostrado abaixo.
09:51:07,835 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 20) MSC000001: Failed to start service jboss.persistenceunit."R2 Boletos#r2boletos": org.jboss.msc.service.StartException in service jboss.persistenceunit."R2 Boletos#r2boletos": java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:172)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117)
at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:667)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:182)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
at org.dom4j.DocumentFactory.getInstance(DocumentFactory.java:97)
at org.hibernate.internal.util.xml.XMLHelper$1.doWork(XMLHelper.java:33)
at org.hibernate.internal.util.xml.XMLHelper$1.doWork(XMLHelper.java:27)
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.workWithClassLoader(ClassLoaderServiceImpl.java:342)
at org.hibernate.internal.util.xml.XMLHelper.<init>(XMLHelper.java:26)
at org.hibernate.envers.boot.internal.EnversServiceImpl.initialize(EnversServiceImpl.java:115)
at org.hibernate.envers.boot.internal.AdditionalJaxbMappingProducerImpl.produceAdditionalMappings(AdditionalJaxbMappingProducerImpl.java:99)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:288)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:847)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:874)
at org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:154)
... 7 more
09:51:07,852 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 4) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "R2 Boletos")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"R2 Boletos#r2boletos\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"R2 Boletos#r2boletos\": 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"}}
09:51:07,856 ERROR [org.jboss.as.server] (management-handler-thread - 4) WFLYSRV0021: Deploy of deployment "R2 Boletos.war" was rolled back with the following failure message:
{"WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"R2 Boletos#r2boletos\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"R2 Boletos#r2boletos\": 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"}}
outra parte do erro
[2016-02-25 09:51:08,774] Artifact r2-boletos:war exploded: Error during artifact deployment. See server log for details.
[2016-02-25 09:51:08,787] Artifact r2-boletos:war exploded: java.lang.Exception: {"WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"R2 Boletos#r2boletos\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"R2 Boletos#r2boletos\": 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"}}
e meu arquivo persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="r2boletos" transaction-type="RESOURCE_LOCAL">
<!--<persistence-unit name="r2boletos" transaction-type="JTA">-->
<!--<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>-->
<!--<jta-data-source>java:/r2BoletosDS</jta-data-source>-->
<properties>
<property name="javax.persistence.jdbc.url" value="jdbc:postgresql://terminal02:5432/r2app_boletos" />
<!--<property name="javax.persistence.jdbc.url" value="jdbc:postgresql://10.132.207.48:5432/r2app_dev_neto" />-->
<property name="javax.persistence.jdbc.user" value="postgres" />
<property name="javax.persistence.jdbc.password" value="r2147258369" />
<property name="javax.persistence.jdbc.driver" value="org.postgresql.Driver" />
<!-- validate | update | create | create-drop -->
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="true" />
<!--<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />-->
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQL94Dialect" />
<!-- Configurações para se usar o Pool de conexões -->
<!--<property name="hibernate.connection.provider_class" value="org.hibernate.connection.C3P0ConnectionProvider" />
<property name="hibernate.c3p0.max_size" value="20" />
<property name="hibernate.c3p0.min_size" value="5" />
<property name="hibernate.c3p0.acquire_increment" value="1" />
<property name="hibernate.c3p0.idle_test_period" value="300" />
<property name="hibernate.c3p0.max_statements" value="50" />
<property name="hibernate.c3p0.timeout" value="300" />-->
</properties>
</persistence-unit>
</persistence>