作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
["jboss.jdbc-driver.mysql"]-6ren"> ["jboss.jdbc-driver.mysql"]-我正在尝试将 mysql 数据源添加到我的 Wildfly(Jboss15.0.0) 服务器。 但我遇到以下错误: WFLYCTL0013: Operation ("add") failed - ad-6ren">
我正在尝试将 mysql 数据源添加到我的 Wildfly(Jboss15.0.0) 服务器。
但我遇到以下错误:
WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "MySqlDS")
]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => ["jboss.jdbc-driver.mysql"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"org.wildfly.data-source.MySqlDS is missing [jboss.jdbc-driver.mysql]",
"jboss.driver-demander.java:/MySqlDS is missing [jboss.jdbc-driver.mysql]"
]
}
09:22:10,385 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "MySqlDS")
]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => [
"jboss.jdbc-driver.mysql",
"jboss.jdbc-driver.mysql"
],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"org.wildfly.data-source.MySqlDS is missing [jboss.jdbc-driver.mysql]",
"jboss.driver-demander.java:/MySqlDS is missing [jboss.jdbc-driver.mysql]",
"org.wildfly.data-source.MySqlDS is missing [jboss.jdbc-driver.mysql]"
]
}
<module xmlns="urn:jboss:module:1.0" name="mysql">
<resources>
<resource-root path="mysql-connector-java-5.1.46-bin.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
<datasources>
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
</datasource>
<datasource jta="true" jndi-name="java:/MySqlDS" pool-name="MySqlDS" use-java-context="true" use-ccm="true">
<connection-url>jdbc:mysql://localhost:3306/onlinestock?characterEncoding=UTF8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true</connection-url>
<driver>mysql</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<pool>
<prefill>true</prefill>
<use-strict-min>false</use-strict-min>
<flush-strategy>FailingConnectionOnly</flush-strategy>
</pool>
<security>
<user-name>root</user-name>
<password>root</password>
</security>
</datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
<driver name="mysql" module="com.mysql">
<xa-datasource-class>com.mysql.jdbc.Driver</xa-datasource-class>
</driver>
</drivers>
</datasources>
最佳答案
我更改了 standalone.xml 并且它有效
以这种方式设置标签:
<driver name="mysql" module="com.mysql">
<driver-class>com.mysql.cj.jdbc.Driver</driver-class>
<xa-datasource-class>com.mysql.cj.jdbc.MysqlXADataSource</xa-datasource-class>
</driver>
关于jboss - "WFLYCTL0412: Required services that are not installed:"=> ["jboss.jdbc-driver.mysql"],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54067627/
我是一名优秀的程序员,十分优秀!