gpt4 book ai didi

wildfly-9 - JBoss 错误 : org. jboss.as.controller.management-operation]( Controller 引导线程)

转载 作者:行者123 更新时间:2023-12-04 21:09:23 25 4
gpt4 key购买 nike

我在配置 mysql 依赖项后尝试运行我的 JBOSS,但出现此错误

09:49:00,138 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "TripTicketDS")
]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.data-source.java:jboss/datasources/TripTicketDS is missing [jboss.jdbc-driver.mysql]",
"jboss.driver-demander.java:jboss/datasources/TripTicketDS is missing [jboss.jdbc-driver.mysql]"
]}
09:49:00,149 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "TripTicketDS")
]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.data-source.java:jboss/datasources/TripTicketDS is missing [jboss.jdbc-driver.mysql]",
"jboss.driver-demander.java:jboss/datasources/TripTicketDS is missing [jboss.jdbc-driver.mysql]",
"jboss.data-source.java:jboss/datasources/TripTicketDS is missing [jboss.jdbc-driver.mysql]"
]}

我的standalone.xml配置如下

<datasource jndi-name="java:jboss/datasources/TripTicketDS" pool-name="TripTicketDS" enabled="true" use-java-context="true">
<connection-url>jdbc:mysql://localhost:3306/trip_ticket</connection-url>
<driver>mysql</driver>
<security>
<user-name>root</user-name>
<password></password>
</security>
</datasource>

我的 SQL module.xml 文件看起来像这样

<?xml version="1.0" encoding="UTF-8"?> 
<module xmlns="urn:jboss:module:1.3" name="com.sql.mysql">
<resources>
<resource-root path="mysql-connector-java-5.1.39-bin.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
</dependencies>
</module>

最佳答案

尝试使用 jboss-cli.sh 命令创建模块本身,而不是手动编写 module.xml 文件。这是因为当我们使用一些文本编辑器时,它们可能会将一些隐藏字符附加到我们的文件中。 (特别是当我们在此类编辑器中进行复制和粘贴时)

[standalone@localhost:9990 /]  module add --name=com.mysql.driver  --dependencies=javax.api,javax.transaction.api --resources=/PATH/TO/mysql-connector-java-5.1.35.jar  

[standalone@localhost:9990 /] :reload
{
"outcome" => "success",
"result" => undefined
}

运行上述命令后,您应该会在以下位置看到生成的 module.xml:“wildfly-version.Final/modules/com/mysql/driver/main/module.xml”

现在创建数据源:
[standalone@localhost:9990 /] /subsystem=datasources/jdbc-driver=mysql/:add(driver-module-name=com.mysql.driver,driver-name=mysql,jdbc-compliant=false,driver-class-name=com.mysql.jdbc.Driver)  
{"outcome" => "success"}

关于wildfly-9 - JBoss 错误 : org. jboss.as.controller.management-operation]( Controller 引导线程),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37938162/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com