我正在尝试为 WildFly 10.0 安装 MySQL 驱动程序,但遇到了一些问题。
我正在遵循这些说明 here
我已经使用 Maven 来获取驱动程序 JAR(效果很好。)
mvn dependency:copy -Dartifact=mysql:mysql-connector-java:5.1.18 \
-DoutputDirectory=/path/to/SERVER_HOME/modules/com/mysql/jdbc/main/
并且正在尝试运行此命令以在 JBOSS 中设置 MySql 驱动程序
./path/to/SERVER_HOME/bin/jboss-cli.sh --file=/path/to/mysql-database-config-wildfly.cli
我收到此错误:
/apps/wildfly/bin/jboss-cli.sh --file=/home/ec2-user/aerogear-unifiedpush-server-1.1.0.Final/databases/mysql-database-config-wildfly.cli
07:24:48,338 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 4) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "mysqlup")
]) - failure description: "WFLYJCA0041: Failed to load module for driver [com.mysql.jdbc]"
The batch failed with the following error (you are remaining in the batch editing mode to have a chance to correct the error): {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "WFLYJCA0041: Failed to load module for driver [com.mysql.jdbc]"}}
由于这是全新安装,我对可能出现的问题感到困惑。我以前没有使用过 JBoss,所以我希望有人可以帮助我并为我指明正确的方向。
最佳答案
我没有阅读完整的用户指南,但您错过了模块的添加。仅仅将依赖项复制到模块目录是行不通的。您需要使用module add
CLI 命令。这是 example对于 PostgreSQL。
关于mysql - JBoss Wildfly 10 MYSQL 驱动程序安装问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35008797/