我在wildfly-23.0.1服务器上启动javaee7项目时遇到问题。下面是开始日志:
"WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.module.\"demo-1.0-SNAPSHOT\".\"demo-1.0-SNAPSHOT\".env.jdbc.demoDB"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.\"demo-1.0-SNAPSHOT\".\"demo-1.0-SNAPSHOT\".env.\"com.bambino.demo.HelloServlet\".source is missing [jboss.naming.context.java.module.\"demo-1.0-SNAPSHOT\".\"demo-1.0-SNAPSHOT\".env.jdbc.demoDB]"]
}
22:44:09,005 ERROR [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0021: Deploy of deployment "demo-1.0-SNAPSHOT.war" was rolled back with the following failure message:
{
"WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.module.\"demo-1.0-SNAPSHOT\".\"demo-1.0-SNAPSHOT\".env.jdbc.demoDB"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.\"demo-1.0-SNAPSHOT\".\"demo-1.0-SNAPSHOT\".env.\"com.bambino.demo.HelloServlet\".source is missing [jboss.naming.context.java.module.\"demo-1.0-SNAPSHOT\".\"demo-1.0-SNAPSHOT\".env.jdbc.demoDB]"]
}
22:44:09,009 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-5) WFLYJCA0019: Stopped Driver service with driver-name = demo-1.0-SNAPSHOT.war_com.mysql.cj.jdbc.Driver_8_0
22:44:09,010 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 78) WFLYJPA0011: Stopping Persistence Unit (phase 2 of 2) Service 'demo-1.0-SNAPSHOT.war#generalPU'
22:44:09,012 INFO [org.hibernate.orm.beans] (ServerService Thread Pool -- 78) HHH10005004: Stopping BeanContainer : org.hibernate.resource.beans.container.internal.CdiBeanContainerExtendedAccessImpl@5677c4c9
22:44:09,015 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 78) WFLYJPA0011: Stopping Persistence Unit (phase 1 of 2) Service 'demo-1.0-SNAPSHOT.war#generalPU'
22:44:09,039 INFO [org.infinispan.manager.DefaultCacheManager] (ServerService Thread Pool -- 26) Stopping cache manager null on null
22:44:09,045 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0028: Stopped deployment demo-1.0-SNAPSHOT.war (runtime-name: demo-1.0-SNAPSHOT.war) in 39ms
[2021-04-21 10:44:09,084] Artifact demo:war: Error during artifact deployment. See server log for details.
[2021-04-21 10:44:09,084] Artifact demo:war: java.lang.Exception: {"WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.module.\"demo-1.0-SNAPSHOT\".\"demo-1.0-SNAPSHOT\".env.jdbc.demoDB"],"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.\"demo-1.0-SNAPSHOT\".\"demo-1.0-SNAPSHOT\".env.\"com.bambino.demo.HelloServlet\".source is missing [jboss.naming.context.java.module.\"demo-1.0-SNAPSHOT\".\"demo-1.0-SNAPSHOT\".env.jdbc.demoDB]"]}
持久性.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence 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_2.xsd"
version="2.2">
<persistence-unit name="generalPU" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>jdbc/demoDB</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="javax.persistence.schema-generation.database.action" value="create"/>
<property name="eclipselink.logging.level" value="FINEST"/>
<property name="eclipselink.logging.parameters" value="true"/>
<property name="eclipselink.cache.share.default" value="false"/>
<property name="eclipselink.jdbc.sequence-connection-pool" value="true" />
</properties>
</persistence-unit>
</persistence>
有人能帮我解决这个问题吗?
暂无答案!
目前还没有任何答案,快来回答吧!