2 Replies Latest reply on Aug 2, 2017 1:02 AM by jaikiran pai

    WildFly deploy error - More than one EJB found with interface of type XXX

    Rodrigo Zampieri Castilho Newbie

      Hi,

       

      I am migrating some applications from Weblogic to WildFly, but I'm getting the error below during deployment.

       

      The applications are current running on Weblogic.

       

      14:05:46,699 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "KHUBGeradorNomesEAR.ear")]) - failure description: {

          "WFLYCTL0080: Failed services" => {"jboss.deployment.subunit.\"KHUBGeradorNomesEAR.ear\".\"AliasReservaEJB.jar\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"KHUBGeradorNomesEAR.ear\".\"AliasReservaEJB.jar\".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of subdeployment \"AliasReservaEJB.jar\" of deployment \"KHUBGeradorNomesEAR.ear\"

          Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEE0052: Failed to install component AliasReservaSessionBean

          Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEJB0408: More than one EJB found with interface of type 'br.com.kroton.ad.aliasreserva.ejb.session.AliasReservaSessionBeanLocal' for binding java:comp/env/ejb/AliasReservaSessionBeanLocal. Found: [View of type br.com.kroton.ad.aliasreserva.ejb.session.AliasReservaSessionBeanLocal for org.jboss.as.ejb3.component.stateless.StatelessComponentDescription{serviceName=service jboss.deployment.subunit.\"KHUBGeradorNomesEAR.ear\".\"AliasReservaEJB.jar\".component.AliasReservaSessionBean}@fdd62f7, View of type br.com.kroton.ad.aliasreserva.ejb.session.AliasReservaSessionBeanLocal for org.jboss.as.ejb3.component.stateless.StatelessComponentDescription{serviceName=service jboss.deployment.subunit.\"KHUBGeradorNomesEAR.ear\".\"AliasReservaEJB.jar\".component.AliasReservaSessionBeanName}@fdfb0d0]"},

          "WFLYCTL0412: Required services that are not installed:" => [

              "jboss.naming.context.java.comp.KHUBGeradorNomesEAR.AliasReservaEJB.AliasReservaSessionBean",

              "jboss.deployment.subunit.\"KHUBGeradorNomesEAR.ear\".\"AliasReservaEJB.jar\".deploymentCompleteService",

              "jboss.naming.context.java.comp.KHUBGeradorNomesEAR.AliasReservaEJB.AliasReservaSessionBeanName",

              "jboss.deployment.subunit.\"KHUBGeradorNomesEAR.ear\".\"AliasReservaEJB.jar\".INSTALL",

              "jboss.deployment.subunit.\"KHUBGeradorNomesEAR.ear\".\"AliasReservaEJB.jar\".jndiDependencyService",

              "jboss.deployment.subunit.\"KHUBGeradorNomesEAR.ear\".\"AliasReservaEJB.jar\".beanmanager"

          ],

          "WFLYCTL0180: Services with missing/unavailable dependencies" => [

              "jboss.naming.context.java.comp.KHUBGeradorNomesEAR.AliasReservaEJB.AliasReservaSessionBeanName.ValidatorFactory is missing [jboss.naming.context.java.comp.KHUBGeradorNomesEAR.AliasReservaEJB.AliasReservaSessionBeanName]",

              "jboss.naming.context.java.comp.KHUBGeradorNomesEAR.AliasReservaEJB.AliasReservaSessionBean.InAppClientContainer is missing [jboss.naming.context.java.comp.KHUBGeradorNomesEAR.AliasReservaEJB.AliasReservaSessionBean]",

              "jbo

      ss.naming.context.java.comp.KHUBGeradorNomesEAR.AliasReservaEJB.AliasReservaSessionBeanName.InAppClientContainer is missing [jboss.naming.context.java.comp.KHUBGeradorNomesEAR.AliasReservaEJB.AliasReservaSessionBeanName]",

              "jboss.deployment.unit.\"KHUBGeradorNomesEAR.ear\".WeldStartService is missing [jboss.deployment.subunit.\"KHUBGeradorNomesEAR.ear\".\"AliasReservaEJB.jar\".jndiDependencyService]",

              "jboss.naming.context.java.comp.KHUBGeradorNomesEAR.AliasReservaEJB.AliasReservaSessionBeanName.InstanceName is missing [jboss.naming.context.java.comp.KHUBGeradorNomesEAR.AliasReservaEJB.AliasReservaSessionBeanName]",

              "jboss.deployment.subunit.\"KHUBGeradorNomesEAR.ear\".\"AliasReservaEJB.jar\".batch.environment is missing [jboss.deployment.subunit.\"KHUBGeradorNomesEAR.ear\".\"AliasReservaEJB.jar\".beanmanager]",

              "jboss.deployment.unit.\"KHUBGeradorNomesEAR.ear\".deploymentCompleteService is missing [jboss.deployment.subunit.\"KHUBGeradorNomesEAR.ear\".\"AliasReservaEJB.jar\".deploymentCompleteService]",

              "jboss.naming.context.java.comp.KHUBGeradorNomesEAR.AliasReservaEJB.AliasReservaSessionBean.ValidatorFactory is missing [jboss.naming.context.java.comp.KHUBGeradorNomesEAR.AliasReservaEJB.AliasReservaSessionBean]",

              "jboss.naming.context.java.comp.KHUBGeradorNomesEAR.AliasReservaEJB.AliasReservaSessionBean.InstanceName is missing [jboss.naming.context.java.comp.KHUBGeradorNomesEAR.AliasReservaEJB.AliasReservaSessionBean]",

              "jboss.naming.context.java.comp.KHUBGeradorNomesEAR.AliasReservaEJB.AliasReservaSessionBean.Validator is missing [jboss.naming.context.java.comp.KHUBGeradorNomesEAR.AliasReservaEJB.AliasReservaSessionBean]",

              "jboss.naming.context.java.comp.KHUBGeradorNomesEAR.AliasReservaEJB.AliasReservaSessionBeanName.Validator is missing [jboss.naming.context.java.comp.KHUBGeradorNomesEAR.AliasReservaEJB.AliasReservaSessionBeanName]",

              "jboss.deployment.subunit.\"KHUBGeradorNomesEAR.ear\".\"AliasReservaEJB.jar\".weld.weldClassIntrospector is missing [jboss.deployment.subunit.\"KHUBGeradorNomesEAR.ear\".\"AliasReservaEJB.jar\".beanmanager]"

          ]

      }

       

      Code bellow:

       

      @Stateless(name = "AliasReservaSessionBeanName", mappedName = "AliasReservaSessionBeanMappedName")
      public class AliasReservaSessionBean implements AliasReservaSessionBeanLocal, AliasReservaSessionBeanRemote {
           ...
      }

      @Local

      public interface AliasReservaSessionBeanLocal {

           public AliasReserva consultarByAlias(String alias);

      }

       

      @Remote

      public interface AliasReservaSessionBeanRemote {

           public AliasReserva consultarByAlias(String alias);

      }


      <?xml version="1.0" encoding="UTF-8"?>
      <ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:ejb="http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" version="3.0">
        <display-name>AliasReservaEJB</display-name>
        <enterprise-beans>
        <session>
        <ejb-name>AliasReservaSessionBean</ejb-name>
        <business-remote>br.com.kroton.ad.aliasreserva.ejb.session.AliasReservaSessionBeanRemote</business-remote>
        <ejb-class>br.com.kroton.ad.aliasreserva.ejb.session.AliasReservaSessionBean</ejb-class>
        <ejb-local-ref>
        <ejb-ref-name>ejb/AliasReservaSessionBeanLocal</ejb-ref-name>
        <local>br.com.kroton.ad.aliasreserva.ejb.session.AliasReservaSessionBeanLocal</local>
        </ejb-local-ref>
        </session>
        </enterprise-beans>
      </ejb-jar>
      

      Thanks!