2

我在 OpenShift / JBoss EAP 6 上有一个 Java EE 6 应用程序,由于服务器日志大,它经常用完空间。

最近,EAP不知何故坏了。它再也找不到 MySQL 驱动程序了。
添加 MySQL 盒 ( rhc cartridge add mysql-5.1 -a MyApp) 时会安装驱动程序。
重新启动一切都无济于事。删除 MySQL 磁带并再次添加它没有帮助。

  • 有没有办法在不删除数据库的情况下添加 EAP 模块?
  • 为什么找不到部署扫描器子系统?

这是 OpenShift 上的相关配置(标准)

            <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">
                    <deployment-scanner path="deployments"
                            relative-to="jboss.server.base.dir" scan-interval="5000"
                            deployment-timeout="300" />
            </subsystem>

2013/08/31 21:03:09,044 ERROR [org.jboss.as.controller.management-operation] 
  (management-handler-thread - 4) JBAS014613: Operation ("read-resource") failed
  - address:  ([("subsystem" => "deployment-scanner")]) 
  - failure description: "JBAS014807: Management resource 
    '[(\"subsystem\" => \"deployment-scanner\")]' not found"
2013/08/31 21:03:09,224 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016005: Starting Services for CDI deployment: ROOT.war
2013/08/31 21:03:09,888 INFO  [org.jboss.weld.Version] (MSC service thread 1-1) WELD-000900 1.1.8 (redhat)
2013/08/31 21:03:10,139 INFO  [org.jboss.as.osgi] (MSC service thread 1-3) JBAS011907: Register module: Module "deployment.ROOT.war:main" from Service Module Loader
2013/08/31 21:03:10,881 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 35) JBAS018559: Deployed "ROOT.war"
2013/08/31 21:03:10,887 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:jboss/datasources/MysqlDS] 

2013/08/31 21:03:11,079 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.8.207.1:9990
2013/08/31 21:03:11,079 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss EAP 6.0.0.GA (AS 7.1.2.Final-redhat-1) started (with errors) in 33174ms - Started 240 of 412 services (38 services failed or missing dependencies, 131 services are passive or on-demand)

4

1 回答 1

3

解决了。JDBC 驱动程序模块必须在 git repo 下.openshift/config/modules/。它以前不存在并且网络正常工作,所以我想知道 OpenShift 中是否发生了一些变化。

.openshift/config/modules/com/mysql/jdbc/main/mysql-connector-java-5.1.26-bin.jar

.openshift/config/modules/com/mysql/jdbc/main/module.xml

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="com.mysql.jdbc">
    <resources>
        <resource-root path="mysql-connector-java-5.1.26-bin.jar"/>
    </resources>
    <dependencies>
        <module name="javax.api" />
        <module name="javax.transaction.api" />
    </dependencies>
</module>
于 2013-09-02T00:30:52.320 回答