我正在尝试为WildFly 10.0 bue安装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所以我希望有人可以帮助我并指出我正确的方向。
答案 0 :(得分:0)
我没有阅读完整的用户指南,但您错过了添加模块。只需将依赖项复制到模块目录就行不通了。您需要使用module add
CLI命令。这是PostgreSQL的example。