启动Wildfly时遇到的错误- "jboss.data-source.java:jboss/datasources/SCI_ODS is missing [jboss.jdbc-driv

启动Wildfly时遇到的错误是:

ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("add") failed - address: ([
    ("subsystem" => "datasources"),
    ("data-source" => "SCI_ODS_sql2")
]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => [
    "jboss.data-source.java:jboss/datasources/SCI_ODS is missing [jboss.jdbc-driver.JTDS]",
    "jboss.driver-demander.java:jboss/datasources/SCI_ODS is missing [jboss.jdbc-driver.JTDS]"
]}
ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("add") failed - address: ([
    ("subsystem" => "datasources"),
    ("data-source" => "SCI_ODS_sql2")
]) - failure description: {
    "JBAS014771: Services with missing/unavailable dependencies" => [
        "jboss.data-source.java:jboss/datasources/SCI_ODS is missing [jboss.jdbc-driver.JTDS]",
        "jboss.driver-demander.java:jboss/datasources/SCI_ODS is missing [jboss.jdbc-driver.JTDS]"
    ],
    "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.SCI_ODS_sql2",
            "jboss.naming.context.java.jboss.datasources.SCI_ODS"
        ],
        "Services that may be the cause:" => ["jboss.jdbc-driver.JTDS"]
    }

找到wildfly的standlone.xml文件

启动Wildfly时遇到的错误-

在上图标记的位置下加上数据源配置
 
                    jdbc:mysql://localhost:3306/taskDB
                    mysql
                    
                        root
                    
                    
                        0
                        600
                    
                

启动Wildfly时遇到的错误-
在上图标记的drivers下加上下面的代码

 
                        com.mysql.jdbc.Driver
                        com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
                    

如果上面配置完不好使,找到wildfly的安装文件夹,到wildfly-14.0.1.Final\modules\system\layers\base\com这个目录下,新建一个mysql文件夹
启动Wildfly时遇到的错误-
在mysql文件夹里新建一个main文件夹
启动Wildfly时遇到的错误-
在main文件夹里包含三个文件----如果用过jboss就可以直接包jboss对应的这部分直接挪过来
启动Wildfly时遇到的错误-
下面是module.xml文件的内容



     
          
     
     
          
          
          
     

你可能感兴趣的:(错误,(ejb,maven))