如何在 JBoss 上部署企业应用程序

如何在 JBoss 上部署企业应用程序

我在 Jboss 上部署企业应用程序时遇到了最大的困难。在我看来,Jboss 非常不直观,如果没有大量帮助就无法配置。我正在迁移到 JBoss,因为 glassfish 已经停止了它的商业支持。我试图通过以下方式部署企业应用程序(顺便说一下,这是 EAP7):部署->服务器组->主服务器组->添加当我单击部署时,我收到此错误:

Unexpected HTTP response: 500 Request { "operation" => "add", "address" => [ ("server-group" => "main-server-group"), ("deployment" => "FlcErp_060116.1.ear") ], "runtime-name" => "FlcErp_060116.1.ear", "enabled" => true } Response Internal Server Error { "outcome" => "failed", "result" => undefined, "failure-description" => {"WFLYDC0074: Operation failed or was rolled back on all servers. Server failures:" => {"server-group" => {"main-server-group" => {"host" => {"master" => { "server-one" => {"WFLYCTL0180: Services with missing/unavailable dependencies" => [ "jboss.persistenceunit.\"FlcErp_060116.1.ear/FlcErp_v2-ejb.jar#FlcErp-enterprisePU\" is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantTwoScanner-ejb.jar#PlantTwoScanner-ejbPU\" is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantFourScanner-ejb.jar#PlantFourScanner-ejbPU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/FlcErp_v2-ejb.jar#FlcErp-enterprisePU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantFourScanner-ejb.jar#PlantFourScanner-ejbPU\" is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantTwoScanner-ejb.jar#PlantTwoScanner-ejbPU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]" ]}, "server-two" => {"WFLYCTL0180: Services with missing/unavailable dependencies" => [ "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantFourScanner-ejb.jar#PlantFourScanner-ejbPU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/FlcErp_v2-ejb.jar#FlcErp-enterprisePU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantTwoScanner-ejb.jar#PlantTwoScanner-ejbPU\" is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantTwoScanner-ejb.jar#PlantTwoScanner-ejbPU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantFourScanner-ejb.jar#PlantFourScanner-ejbPU\" is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/FlcErp_v2-ejb.jar#FlcErp-enterprisePU\" is missing [jboss.naming.context.java.jdbc.erp]" ]} }}}}}}, "rolled-back" => true, "server-groups" => {"main-server-group" => {"host" => {"master" => { "server-one" => {"response" => { "outcome" => "failed", "failure-description" => {"WFLYCTL0180: Services with missing/unavailable dependencies" => [ "jboss.persistenceunit.\"FlcErp_060116.1.ear/FlcErp_v2-ejb.jar#FlcErp-enterprisePU\" is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantTwoScanner-ejb.jar#PlantTwoScanner-ejbPU\" is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantFourScanner-ejb.jar#PlantFourScanner-ejbPU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/FlcErp_v2-ejb.jar#FlcErp-enterprisePU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantFourScanner-ejb.jar#PlantFourScanner-ejbPU\" is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantTwoScanner-ejb.jar#PlantTwoScanner-ejbPU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]" ]}, "rolled-back" => true }}, "server-two" => {"response" => { "outcome" => "failed", "failure-description" => {"WFLYCTL0180: Services with missing/unavailable dependencies" => [ "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantFourScanner-ejb.jar#PlantFourScanner-ejbPU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/FlcErp_v2-ejb.jar#FlcErp-enterprisePU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantTwoScanner-ejb.jar#PlantTwoScanner-ejbPU\" is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantTwoScanner-ejb.jar#PlantTwoScanner-ejbPU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/PlantFourScanner-ejb.jar#PlantFourScanner-ejbPU\" is missing [jboss.naming.context.java.jdbc.erp]", "jboss.persistenceunit.\"FlcErp_060116.1.ear/FlcErp_v2-ejb.jar#FlcErp-enterprisePU\" is missing [jboss.naming.context.java.jdbc.erp]" ]}, "rolled-back" => true }} }}}} } 

我进行了一些研究,发现这是由于缺少驱动程序造成的,我一直试图纠正,但没有成功。我已将其添加到 /opt/JBoss7/domain/configuration/domain.xml :

<datasource
        jndi-name="java:/erp" pool-name="erpPool"
        enabled="true" jta="true"
        use-java-context="true" use-ccm="true">
    <connection-url>
        jdbc:mysql://localhost:3306/erp
    </connection-url>
    <driver>
        mysql
    </driver>
    <security>
        <user-name>
            root
        </user-name>
        <password>
    flc_admin14114
        </password>
    </security>
    <statement>
        <prepared-statement-cache-size>
            100
        </prepared-statement-cache-size>
        <share-prepared-statements/>
    </statement>
</datasource>

以及注册驱动程序:

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

我也尝试将我的 mysql 驱动程序部署为应用程序(与我部署企业应用程序的方式相同)仍然没有运气,请不要将我链接到网站,我已经看过所有网站了。

编辑:刚刚尝试再次部署我的数据源并收到此错误:

Message





 Tue Jun 07 10:00:26 GMT-700 2016
Unknown error

Unexpected HTTP response: 500

Request
{
    "operation" => "composite",
    "address" => [],
    "steps" => [
        {
            "password" => "flc_admin14114",
            "enabled" => true,
            "jndi-name" => "java:/MysqlDataSource",
            "user-name" => "admin",
            "pool-name" => "MysqlDataSource_Pool",
            "driver-class" => "com.mysql.jdbc.Driver",
            "driver-name" => "mysql",
            "valid-connection-checker-class-name" => "org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker",
            "background-validation" => true,
            "exception-sorter-class-name" => "org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter",
            "use-ccm" => true,
            "name" => "MysqlDataSource",
            "operation" => "add",
            "address" => [
                ("profile" => "Freres_Admin"),
                ("subsystem" => "datasources"),
                ("xa-data-source" => "MysqlDataSource")
            ]
        },
        {
            "address" => [
                ("profile" => "Freres_Admin"),
                ("subsystem" => "datasources"),
                ("xa-data-source" => "MysqlDataSource"),
                ("xa-datasource-properties" => "ServerName")
            ],
            "operation" => "add",
            "value" => "localhost"
        },
        {
            "address" => [
                ("profile" => "Freres_Admin"),
                ("subsystem" => "datasources"),
                ("xa-data-source" => "MysqlDataSource"),
                ("xa-datasource-properties" => "DatabaseName")
            ],
            "operation" => "add",
            "value" => "erp"
        }
    ]
}

    Response

    Internal Server Error
    {
        "outcome" => "failed",
        "failure-description" => {"domain-failure-description" => {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "WFLYCTL0158: Operation handler failed: java.lang.IllegalStateException: WFLYCTL0363: Capability 'org.wildfly.data-source.MysqlDataSource' is already registered in context 'profile=Freres_Admin'."}}},
        "rolled-back" => true
    }

相关内容