OpenShift,JBoss EAP 6 - 如何重新添加MySQL驱动程序

时间:2013-09-01 03:48:40

标签: mysql openshift jboss-eap-6

我在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)

1 个答案:

答案 0 :(得分:2)

解决。 JDBC驱动程序模块必须位于.openshift/config/modules/下的git repo中。以前它不存在,网络工作,所以我想知道OpenShift中是否有变化。

.openshift /配置/模块/ COM / MySQL的/ JDBC /主/ MySQL的连接器的Java-5.1.26-bin.jar

.openshift /配置/模块/ COM / MySQL的/ JDBC /主/ 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>