9 Replies Latest reply on Aug 30, 2019 8:58 AM by usharik

    Incompatible conflicting binding Exception and EJB naming

    usharik

      Got wired exception for very simple EJB with @Remote annotated interface in time of deploy to WildFly 17.0.1.Final

      @Stateless 
      public class UserServiceImpl implements UserServiceRemote { 
            @Override
            public List<UserRepr> getAllUsers() {
                return null;
            }
      }
      @Remote 
      public interface UserServiceRemote { 
           List<UserRepr> getAllUsers();
      }

      The exception is

      Caused by: java.lang.IllegalArgumentException: WFLYEE0047: Incompatible conflicting binding at java:jboss/exported/simple-webapp/UserServiceImpl!ru.geekbrains.jsf.UserServiceRemote 
      source
      : org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor$2@6aba1c4b"},
      "WFLYCTL0412: Required services that are not installed:" => [ "jboss.deployment.unit.\"simple-webapp.war\".beanmanager", "jboss.deployment.unit.\"simple-webapp.war\".WeldStartService" ],
      "WFLYCTL0180: Services with missing/unavailable dependencies" => [ "jboss.deployment.unit.\"simple-webapp.war\".batch.artifact.factory is missing [jboss.deployment.unit.\"simple-webapp.war\".beanmanager]",
      "jboss.deployment.unit.\"simple-webapp.war\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\"simple-webapp.war\".beanmanager, jboss.deployment.unit.\"simple-webapp.war\".WeldStartService]" ] }

      I found out that I can resolve this problem by changing name of 'UserServiceImpl' class to 'UserServiceRemoteImpl'. Could you help me to understand what is wrong here. Is there some obligatory naming contract for EJB classes and views?