在Eclipse Mars中运行Wildfly导致错误

时间:2016-10-21 22:34:16

标签: java eclipse wildfly wildfly-9

23:26:11,838 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([

    ("subsystem" => "ejb3"),
    ("service" => "remote")
]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.ejb3.connector is missing 

[jboss.remoting.remotingConnectorInfoService.http-remoting-connector]"]}

23:26:11,883 INFO  [org.jboss.as.controller] (Controller Boot Thread) 

WFLYCTL0183: Service status report

WFLYCTL0184:    New missing/unsatisfied dependencies:

      service jboss.jdbc-driver.mysql-connector-java-5_1_6_jar (missing) 

dependents: [service jboss.data-source.java:/IncidentManagerDS, service 

jboss.driver-demander.java:/IncidentManagerDS] 

      service jboss.remoting.remotingConnectorInfoService.http-remoting-

connector (missing) dependents: [service jboss.ejb3.connector] 

WFLYCTL0186:   Services which failed to start:      service 

jboss.undertow.listener.default: org.jboss.msc.service.StartException in service 

jboss.undertow.listener.default: Could not start http listener

23:26:11,974 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http 

management interface listening on http://0.0.0.0:9990/management

23:26:11,974 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin

 console listening on http://0.0.0.0:9990

23:26:11,975 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly

 Full 9.0.2.Final (WildFly Core 1.0.2.Final) started (with errors) in 2555ms -

 Started 193 of 382 services (10 services failed or missing dependencies, 210 

services are lazy, passive or on-demand)

1 个答案:

答案 0 :(得分:0)

看起来您将配置代码段粘贴到WILDFLY_HOME/standalone/configuration/standalone.xml并忘记将驱动程序放入类路径中。

您可以尝试以下两个选项之一:

  1. 您可以将带有MySQL驱动程序的JAR(例如mysql-connector-java-5.1.37.jar)放到WILDFLY_HOME/standalone/deployments,就像部署WAR一样。

  2. 您可以在WILDFLY_HOME/modules中创建一个包含驱动程序的模块,有关详细信息,请参阅https://docs.jboss.org/author/display/WFLY8/Class+Loading+in+WildFly

  3. 然后您可以参考数据源配置或persistence.xml中的驱动程序

    摘自standalone.xml,指的是部署到部署目录中的驱动程序。

        <datasource ...>
            <driver-class>com.mysql.jdbc.Driver</driver-class>
            <driver>mysql-connector-java-5.1.37.jar_com.mysql.jdbc.Driver_5_1</driver>
            ...
        </datasource>
    

    摘自standalone.xml,将驱动程序称为模块。

        <datasources>
            <datasource ...>
                <driver>mysqljdbc</driver>
                ...
            </datasource>
    
            <drivers>
                <driver name="mysqljdbc" module="com.mysql.jdbc">
                     <driver-class>com.mysql.jdbc.Driver</driver-class>
                </driver>
            </drivers>
        </datasources>
    

    无论如何,这个问题与Eclipse Mars IDE无关,即使从命令行运行服务器也无法启动。