当前位置: 动力学知识库 > 问答 > 编程问答 >

maven - JBoss Wildfly 10 MYSQL Driver install problems

问题描述:

I am attempting to install a MySQL Driver for WildFly 10.0 bue running into some issues.

I am follwowing these instructions here

I have used Maven to get the driver JAR (This worked fine.)

mvn dependency:copy -Dartifact=mysql:mysql-connector-java:5.1.18 \

-DoutputDirectory=/path/to/SERVER_HOME/modules/com/mysql/jdbc/main/

And am attempting to run this command to setup the MySql driver in JBOSS

 ./path/to/SERVER_HOME/bin/jboss-cli.sh --file=/path/to/mysql-database-config-wildfly.cli

I get this error:

/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]"}}

As this is a fresh install Im stumped as to what might be the issue. I haven't used JBoss before so I am hoping someone can help me out and point me in the right direction.

网友答案:

I did not read the full user guide, but you're missing the adding of the module. Simply just copying the dependency to the modules directory will not work. You need to use the module add CLI command. Here's an example for PostgreSQL.

分享给朋友:
您可能感兴趣的文章:
随机阅读: