【问题标题】:Unable to run IntelliJ project with MySQL and Gradle under WildFlyWildFly 下无法使用 MySQL 和 Gradle 运行 IntelliJ 项目
【发布时间】:2021-04-28 00:24:06
【问题描述】:
14:10:16,119 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "Countries-Balci-1.0.war")]) - failure description: {
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.app.\"Countries-Balci-1.0\".jdbc.CountriesDB"],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => [
        "jboss.persistenceunit.\"Countries-Balci-1.0.war#Countries-BalciPU\" is missing [jboss.naming.context.java.app.\"Countries-Balci-1.0\".jdbc.CountriesDB]",
        "jboss.persistenceunit.\"Countries-Balci-1.0.war#Countries-BalciPU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.app.\"Countries-Balci-1.0\".jdbc.CountriesDB]"
    ]
}
14:10:16,120 ERROR [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0021: Deploy of deployment "Countries-Balci-1.0.war" was rolled back with the following failure message: 
{
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.app.\"Countries-Balci-1.0\".jdbc.CountriesDB"],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => [
        "jboss.persistenceunit.\"Countries-Balci-1.0.war#Countries-BalciPU\" is missing [jboss.naming.context.java.app.\"Countries-Balci-1.0\".jdbc.CountriesDB]",
        "jboss.persistenceunit.\"Countries-Balci-1.0.war#Countries-BalciPU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.app.\"Countries-Balci-1.0\".jdbc.CountriesDB]"
    ]
}

我附上显示一些文件的项目截图。

我们将不胜感激。

【问题讨论】:

  • 数据源 JNDI 名称不存在导致失败。
  • 数据源 JNDI 名称不存在在哪里?你能具体点吗?非常感谢!
  • 我在 WildFly Standalone.xml 中将 JNDI 名称指定为

标签: mysql gradle intellij-idea wildfly


【解决方案1】:

java:app/jdbc/CountriesDB 是您在持久性单元中使用的名称,而您已在名称 java:/CountriesDB 下注册了数据源。如您所见,它们不匹配。

【讨论】:

    猜你喜欢
    • 2015-01-15
    • 2020-05-21
    • 2016-08-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-06
    • 2017-05-29
    相关资源
    最近更新 更多