2014-11-17 96 views
0

所以我遵循本教程:https://zorq.net/b/2011/07/12/adding-a-mysql-datasource-to-jboss-as-7/將MySql添加到JBoss 8.1(Wildfly)

我已經完成了本教程中所述的一切;但我不斷收到這個錯誤在啓動時:

14:42:19,442 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("add") failed - address: ([ 
    ("subsystem" => "datasources"), 
    ("data-source" => "ExpensesDataSourcePool") 
]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => [ 
    "jboss.data-source.java:/ExpensesDataSource is missing [jboss.jdbc-driver.mysql]", 
    "jboss.driver-demander.java:/ExpensesDataSource is missing [jboss.jdbc-driver.mysql]" 
]} 
14:42:19,450 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("add") failed - address: ([ 
    ("subsystem" => "datasources"), 
    ("data-source" => "ExpensesDataSourcePool") 
]) - failure description: { 
    "JBAS014771: Services with missing/unavailable dependencies" => [ 
     "jboss.data-source.java:/ExpensesDataSource is missing [jboss.jdbc-driver.mysql]", 
     "jboss.driver-demander.java:/ExpensesDataSource is missing [jboss.jdbc-driver.mysql]" 
    ], 
    "JBAS014879: One or more services were unable to start due to one or more indirect dependencies not being available." => { 
     "Services that were unable to start:" => [ 
      "jboss.data-source.reference-factory.ExpensesDataSourcePool", 
      "jboss.naming.context.java.ExpensesDataSource" 
     ], 
     "Services that may be the cause:" => ["jboss.jdbc-driver.mysql"] 
    } 
} 
14:42:19,489 INFO [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS018559: Deployed "mysql-connector-java-5.1.34.jar" (runtime-name : "mysql-connector-java-5.1.34.jar") 
14:42:19,491 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report 
JBAS014775: New missing/unsatisfied dependencies: 
     service jboss.jdbc-driver.mysql (missing) dependents: [service jboss.data-source.java:/ExpensesDataSource, service jboss.driver-demander.java:/ExpensesDataSource] 

這是我的模塊目錄的在JBoss文件夾結構:modules/com/mysql/main有兩個文件module.xmlmysql-connector-java-5.1.34.jar

這是我的module.xml文件:

<?xml version="1.0" encoding="UTF-8"?> 

<module xmlns="urn:jboss:module:1.0" name="com.mysql"> 
    <resources> 
    <resource-root path="mysql-connector-java-5.1.34.jar"/> 
    </resources> 
    <dependencies> 
    <module name="javax.api"/> 
    </dependencies> 
</module> 

我也加入了MySQL一罐standalone/deployments

這是我datasou的配置standalone/configuration

<datasource jndi-name="java:/ExpensesDataSource" pool-name="ExpensesDataSourcePool" enabled="true" use-java-context="true"> 
        <connection-url>jdbc:mysql://localhost:3306/expenses</connection-url> 
        <driver>mysql</driver> 
        <security> 
         <user-name>root</user-name> 
         <password>root</password> 
        </security> 
       </datasource> 


       <driver name="mysql" module="com.mysql"/> 

回答

0

我發現我的錯誤下RCE和司機在我standalone.xml,我不得不把我的module.xml和jar下的系統模塊,而不是創建一個新的文件夾COM