我曾经在EC2实例上的JBoss WildFly(12.0.0。)上运行我的应用程序。我也让我的数据库运行在RDS实例上。一切都连接非常好,它的工作。但是两天前,我不得不从我的MariaDB RDS切换到EC2 MariaDB(Bitnami)。我像以前一样配置了连接,但是现在在部署过程中出现了错误,如标题中所述。这是我的错误堆栈的第一行,还有600多个...:
2018-06-24 09:16:40,296 INFO [org.jboss.as.repository] (management-handler-thread - 3) WFLYDR0001: Content added at location /opt/bitnami/wildfly/standalone/data/content/4b/37444aeb2e1f4f9e73b5ecfb3ee291bd830377/content
2018-06-24 09:16:40,487 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0027: Starting deployment of "TandemPartnerWebArchiv.war" (runtime-name: "TandemPartnerWebArchiv.war")
2018-06-24 09:16:41,804 INFO [org.jboss.as.jpa] (MSC service thread 1-2) WFLYJPA0002: Read persistence.xml for ExperimentalJPADatabase
2018-06-24 09:16:41,878 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 67) WFLYJPA0010: Starting Persistence Unit (phase 1 of 2) Service 'TandemPartnerWebArchiv.war#ExperimentalJPADatabase'
2018-06-24 09:16:41,878 INFO [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 67) HHH000204: Processing PersistenceUnitInfo [
name: ExperimentalJPADatabase
...]
2018-06-24 09:16:41,932 INFO [org.jboss.weld.deployer] (MSC service thread 1-1) WFLYWELD0003: Processing weld deployment TandemPartnerWebArchiv.war
2018-06-24 09:16:41,952 INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-1) WFLYEJB0473: JNDI bindings for session bean named 'DAO' in deployment unit 'deployment "TandemPartnerWebArchiv.war"' are as follows:
java:global/TandemPartnerWebArchiv/DAO!dao.DAO
java:app/TandemPartnerWebArchiv/DAO!dao.DAO
java:module/DAO!dao.DAO
java:global/TandemPartnerWebArchiv/DAO
java:app/TandemPartnerWebArchiv/DAO
java:module/DAO
2018-06-24 09:16:42,180 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 67) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'TandemPartnerWebArchiv.war#ExperimentalJPADatabase'
2018-06-24 09:16:42,183 INFO [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 67) HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2018-06-24 09:16:42,186 INFO [org.hibernate.envers.boot.internal.EnversServiceImpl] (ServerService Thread Pool -- 67) Envers integration enabled? : true
2018-06-24 09:16:42,221 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 67) MSC000001: Failed to start service jboss.persistenceunit."TandemPartnerWebArchiv.war#ExperimentalJPADatabase": org.jboss.msc.service.StartException in service jboss.persistenceunit."TandemPartnerWebArchiv.war#ExperimentalJPADatabase": 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:195)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:125)
at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:650)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:209)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:485)
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:358)
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:848)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:875)
at org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:167)
... 9 more
2018-06-24 09:16:42,223 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 3) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "TandemPartnerWebArchiv.war")]) - failure description: {
"WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"TandemPartnerWebArchiv.war#ExperimentalJPADatabase\"" => "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.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"com.sun.faces.taglib.html_basic.InputHiddenTag\".START",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"com.sun.faces.taglib.jsf_core.SelectItemTag\".WeldInstantiator",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"com.sun.faces.taglib.jsf_core.SelectItemsTag\".START",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.DAO.START",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"managed-bean.net.bootsfaces.component.radiobutton.RadioButtonInternalStateBean\".WeldInstantiator",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"com.sun.faces.taglib.jsf_core.RegexValidatorTag\".WeldInstantiator",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"com.sun.faces.taglib.html_basic.HtmlBasicValidator\".START",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"com.sun.faces.taglib.html_basic.OutputLinkTag\".START",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"com.sun.faces.taglib.jsf_core.SubviewTag\".WeldInstantiator",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"com.sun.faces.taglib.jsf_core.ValidateLengthTag\".START",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"javax.faces.webapp.FacetTag\".START",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"com.sun.faces.taglib.jsf_core.ActionListenerTag\".START",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"org.jboss.weld.module.web.servlet.WeldInitialListener\".START",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"com.sun.faces.taglib.jsf_core.ViewTag\".START",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"com.sun.faces.taglib.jsf_core.ValidateDoubleRangeTag\".START",
答案 0 :(得分:0)
您似乎在部署中包括dom4j库。您需要从部署中删除该依赖项。