Wildfly部署问题

时间:2016-06-07 09:26:53

标签: java wildfly

我有一个耳朵项目,其中包含以下模块:

  1. RedemtionService
  2. RedemptionWeb
  3. RedemtionBean
  4. RedemptionCache
  5. RedemptionCommon
  6. 在本地wildfly服务器中,我已成功部署它,但是当我要部署另一个生产服务器时,它会抛出以下异常:

    2016-06-07 14:46:06,289 ERROR [org.jboss.as.server] (ServerService Thread Pool -- 76) JBAS015870: Deploy of deployment "Test.ear" was rolled back with the following failure message: 
    {
        "JBAS014771: Services with missing/unavailable dependencies" => [
            "jboss.naming.context.java.comp.Test.RedemptionService.AsyncSMSServiceImpl.InAppClientContainer is missing [jboss.naming.context.java.comp.Test.RedemptionService.AsyncSMSServiceImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionBeans.GenericDAOImpl.ORB is missing [jboss.naming.context.java.comp.Test.RedemptionBeans.GenericDAOImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionService.AsyncSMSServiceImpl.HandleDelegate is missing [jboss.naming.context.java.comp.Test.RedemptionService.AsyncSMSServiceImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionService.AsyncSMSServiceImpl.InstanceName is missing [jboss.naming.context.java.comp.Test.RedemptionService.AsyncSMSServiceImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionService.FGSFServiceImpl.Validator is missing [jboss.naming.context.java.comp.Test.RedemptionService.FGSFServiceImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionBeans.GenericDAOImpl.InstanceName is missing [jboss.naming.context.java.comp.Test.RedemptionBeans.GenericDAOImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionCache.AppCacheService.Validator is missing [jboss.naming.context.java.comp.Test.RedemptionCache.AppCacheService]",
            "jboss.naming.context.java.comp.Test.RedemptionService.FGSFServiceImpl.HandleDelegate is missing [jboss.naming.context.java.comp.Test.RedemptionService.FGSFServiceImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionCache.AppCacheService.ORB is missing [jboss.naming.context.java.comp.Test.RedemptionCache.AppCacheService]",
            "jboss.naming.context.java.comp.Test.RedemptionService.FGSFServiceImpl.ValidatorFactory is missing [jboss.naming.context.java.comp.Test.RedemptionService.FGSFServiceImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionBeans.CacheDaoImpl.Validator is missing [jboss.naming.context.java.comp.Test.RedemptionBeans.CacheDaoImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionBeans.FGSFDaoImpl.InstanceName is missing [jboss.naming.context.java.comp.Test.RedemptionBeans.FGSFDaoImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionBeans.FGSFDaoImpl.HandleDelegate is missing [jboss.naming.context.java.comp.Test.RedemptionBeans.FGSFDaoImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionCache.AppCacheService.InAppClientContainer is missing [jboss.naming.context.java.comp.Test.RedemptionCache.AppCacheService]",
            "jboss.naming.context.java.comp.Test.RedemptionBeans.FGSFDaoImpl.ORB is missing [jboss.naming.context.java.comp.Test.RedemptionBeans.FGSFDaoImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionService.FGSFRedeemServiceImpl.HandleDelegate is missing [jboss.naming.context.java.comp.Test.RedemptionService.FGSFRedeemServiceImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionBeans.FGSFDaoImpl.ValidatorFactory is missing [jboss.naming.context.java.comp.Test.RedemptionBeans.FGSFDaoImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionService.FGSFServiceImpl.ORB is missing [jboss.naming.context.java.comp.Test.RedemptionService.FGSFServiceImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionService.FGSFRedeemServiceImpl.Validator is missing [jboss.naming.context.java.comp.Test.RedemptionService.FGSFRedeemServiceImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionBeans.GenericDAOImpl.HandleDelegate is missing [jboss.naming.context.java.comp.Test.RedemptionBeans.GenericDAOImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionBeans.CacheDaoImpl.ORB is missing [jboss.naming.context.java.comp.Test.RedemptionBeans.CacheDaoImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionBeans.CacheDaoImpl.ValidatorFactory is missing [jboss.naming.context.java.comp.Test.RedemptionBeans.CacheDaoImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionService.FGSFRedeemServiceImpl.ORB is missing [jboss.naming.context.java.comp.Test.RedemptionService.FGSFRedeemServiceImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionService.AsyncSMSServiceImpl.Validator is missing [jboss.naming.context.java.comp.Test.RedemptionService.AsyncSMSServiceImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionService.FGSFServiceImpl.InstanceName is missing [jboss.naming.context.java.comp.Test.RedemptionService.FGSFServiceImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionBeans.CacheDaoImpl.InAppClientContainer is missing [jboss.naming.context.java.comp.Test.RedemptionBeans.CacheDaoImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionBeans.FGSFDaoImpl.InAppClientContainer is missing [jboss.naming.context.java.comp.Test.RedemptionBeans.FGSFDaoImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionBeans.FGSFDaoImpl.Validator is missing [jboss.naming.context.java.comp.Test.RedemptionBeans.FGSFDaoImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionBeans.CacheDaoImpl.HandleDelegate is missing [jboss.naming.context.java.comp.Test.RedemptionBeans.CacheDaoImpl]",
            "jboss.deployment.subunit.\"Test.ear\".\"RedemptionCache.jar\".weld.weldClassIntrospector is missing [jboss.deployment.subunit.\"Test.ear\".\"RedemptionCache.jar\".beanmanager]",
            "jboss.deployment.subunit.\"Test.ear\".\"RedemptionBeans.jar\".weld.weldClassIntrospector is missing [jboss.deployment.subunit.\"Test.ear\".\"RedemptionBeans.jar\".beanmanager]",
            "jboss.naming.context.java.comp.Test.RedemptionCache.AppCacheService.HandleDelegate is missing [jboss.naming.context.java.comp.Test.RedemptionCache.AppCacheService]",
            "jboss.naming.context.java.comp.Test.RedemptionBeans.GenericDAOImpl.Validator is missing [jboss.naming.context.java.comp.Test.RedemptionBeans.GenericDAOImpl]",
            "jboss.deployment.subunit.\"Test.ear\".\"RedemptionService.jar\".weld.weldClassIntrospector is missing [jboss.deployment.subunit.\"Test.ear\".\"RedemptionService.jar\".beanmanager]",
            "jboss.naming.context.java.comp.Test.RedemptionService.FGSFRedeemServiceImpl.InAppClientContainer is missing [jboss.naming.context.java.comp.Test.RedemptionService.FGSFRedeemServiceImpl]",
            "jboss.deployment.unit.\"Test.ear\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\"Test.ear\".beanmanager]",
            "jboss.naming.context.java.comp.Test.RedemptionBeans.CacheDaoImpl.InstanceName is missing [jboss.naming.context.java.comp.Test.RedemptionBeans.CacheDaoImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionBeans.GenericDAOImpl.InAppClientContainer is missing [jboss.naming.context.java.comp.Test.RedemptionBeans.GenericDAOImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionService.AsyncSMSServiceImpl.ORB is missing [jboss.naming.context.java.comp.Test.RedemptionService.AsyncSMSServiceImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionService.FGSFRedeemServiceImpl.InstanceName is missing [jboss.naming.context.java.comp.Test.RedemptionService.FGSFRedeemServiceImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionService.AsyncSMSServiceImpl.ValidatorFactory is missing [jboss.naming.context.java.comp.Test.RedemptionService.AsyncSMSServiceImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionCache.AppCacheService.ValidatorFactory is missing [jboss.naming.context.java.comp.Test.RedemptionCache.AppCacheService]",
            "jboss.naming.context.java.comp.Test.RedemptionService.FGSFRedeemServiceImpl.ValidatorFactory is missing [jboss.naming.context.java.comp.Test.RedemptionService.FGSFRedeemServiceImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionCache.AppCacheService.InstanceName is missing [jboss.naming.context.java.comp.Test.RedemptionCache.AppCacheService]",
            "jboss.naming.context.java.comp.Test.RedemptionService.FGSFServiceImpl.InAppClientContainer is missing [jboss.naming.context.java.comp.Test.RedemptionService.FGSFServiceImpl]",
            "jboss.naming.context.java.comp.Test.RedemptionBeans.GenericDAOImpl.ValidatorFactory is missing [jboss.naming.context.java.comp.Test.RedemptionBeans.GenericDAOImpl]"
        ],
        "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.deployment.subunit.\"Test.ear\".\"RedemptionBeans.jar\".INSTALL",
                "jboss.deployment.subunit.\"Test.ear\".\"RedemptionCache.jar\".INSTALL",
                "jboss.deployment.subunit.\"Test.ear\".\"RedemptionService.jar\".INSTALL",
                "jboss.deployment.subunit.\"Test.ear\".\"RedemptionWeb.war\".INSTALL",
                "jboss.deployment.unit.\"Test.ear\".INSTALL"
            ],
            "Services that may be the cause:" => [
                "jboss.deployment.subunit.\"Test.ear\".\"RedemptionBeans.jar\".beanmanager",
                "jboss.deployment.subunit.\"Test.ear\".\"RedemptionCache.jar\".beanmanager",
                "jboss.deployment.subunit.\"Test.ear\".\"RedemptionService.jar\".beanmanager",
                "jboss.deployment.unit.\"Test.ear\".beanmanager",
                "jboss.http-upgrade-registry.default",
                "jboss.naming.context.java.comp.Test.RedemptionBeans.CacheDaoImpl",
                "jboss.naming.context.java.comp.Test.RedemptionBeans.FGSFDaoImpl",
                "jboss.naming.context.java.comp.Test.RedemptionBeans.GenericDAOImpl",
                "jboss.naming.context.java.comp.Test.RedemptionCache.AppCacheService",
                "jboss.naming.context.java.comp.Test.RedemptionService.AsyncSMSServiceImpl",
                "jboss.naming.context.java.comp.Test.RedemptionService.FGSFRedeemServiceImpl",
                "jboss.naming.context.java.comp.Test.RedemptionService.FGSFServiceImpl",
                "jboss.remoting.remotingConnectorInfoService.http-remoting-connector"
            ]
    

    我该如何解决这个问题?我在过去2天内搜索此解决方案,但仍未找到任何内容。

1 个答案:

答案 0 :(得分:1)

默认情况下,ear部署中的一个模块中的类无法访问其他模块的类。您必须提供jboss-deployment-structure.xml并覆盖默认行为。您必须将ear-subdeployments-isolated设置为false以启用类的共享。有关更多详细信息,请参阅以下链接中有关EAR类加载的部分:

https://docs.jboss.org/author/display/WFLY8/Class+Loading+in+WildFly?_sscc=t