3 Replies Latest reply on Aug 7, 2014 10:00 AM by Chris Slater

    Local EJB interface in jar in ear/lib cannot be resolved

    Chris Slater Newbie

      I am trying to migrate a supposedly portable ear project from Glassfish to Wildfly and am getting the following error (full log at deployment below):

       

      Caused by: org.jboss.msc.service.ServiceNotFoundException: Service service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-dev-ejb-wildfly-SNAPSHOT.jar".component.MetadataServiceDaoBean.VIEW."com.mycompany.sso.saml.dao.MetadataServiceDaoLocal".LOCAL not found

       

      I have the following project structure

       

      - metadata-svc-ear-wildfly-SNAPAHOT.ear

      ---- metadata-svc-web-wildfly-SNAPAHOT.war

      ---- metadata-svc-dev-ejb-wildfly-SNAPAHOT.jar

      ---- META-INF

      --------- application.xml

      ---- lib

      --------- metadata-svc-int-wildfly-SNAPAHOT.jar

       

      metadata-svc-dev-wildfly-SNAPAHOT.jar contains a local interface for an ejb implementation in metadata-svc-dev-ejb-wildfly-SNAPAHOT.jar.  The EJB interface is injected using @EJB in a managed bean in metadata-svc-web-wildfly-SNAPAHOT.war  This all worked perfectly with Glassfish.

       

      Here are my classes:

       

      @Local
      public interface MetadataServiceDaoLocal {
          public IdentityProvider getPrimaryIdentityProvider(String entityId);
          public Provider getProvider(String entityId);
          public List<ServiceProvider> getServiceProviders();
          public List<IdentityProvider> getAssociatedIdentityProviders(String entityId);
      }
      
      

       

      @Stateless
      public class MetadataServiceDaoBean implements MetadataServiceDaoLocal {
      
          @EJB
          private ProvidersHolder providersHolder;
      
          @Override
          public IdentityProvider getPrimaryIdentityProvider(String entityId) {
              //implementation
          }
      
          @Override
          public Provider getProvider(String entityId) {
              //implementation
          }
      
          @Override
          public List<ServiceProvider> getServiceProviders() {
              //implementation
          }
      
          @Override
          public List<IdentityProvider> getAssociatedIdentityProviders(String entityId) {
           //implementation
          }
      }
      
      

       

      Here is my application.xml

       

      <?xml version="1.0" encoding="UTF-8"?>
      <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd" version="6">
        <application-name>metadata-svc</application-name>
        <description>metadata-svc</description>
        <display-name>metadata-svc</display-name>
        <initialize-in-order>true</initialize-in-order>
        <module>
          <web>
            <web-uri>metadata-svc-web-wildfly-SNAPSHOT.war</web-uri>
            <context-root>/metadata-svc</context-root>
          </web>
        </module>
        <module>
          <ejb>metadata-svc-dev-ejb-wildfly-SNAPSHOT.jar</ejb>
        </module>
        <library-directory>lib</library-directory>
      </application>
      
      

       

      If I move the MetadataServiceDaoLocal interface out of the jar in the ear lib (metadata-svc-int-wildfly-SNAPAHOT.jar) folder to the same project as the ejb (metadata-svc-dev-ejb-wildfly-SNAPAHOT.jar) and remove references for the interface from the war (to fix compilation problems), the ear deploys without error.

       

      I have also tried setting the isolated subdeployment option in Wildfly to both true and false with no difference.

       

      I also tried accessing other classes from the metadata-svc-int-wildfly-SNAPAHOT.jar to see if there was a classloader isolation issue.  I was able to use other classes without error (after temporarily removing the troublesome EJB / interface)

       

      Is this a bug?  Is there a workaround?  We have lots of projects with this structure that work fine in Glassfish and would like to switch to Wildfly.

       

      Full log

       

      2014-08-06 18:50:11,304 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "metadata-svc-ear-wildfly-SNAPSHOT.ear" (runtime-name: "metadata-svc-ear-wildfly-SNAPSHOT.ear")

      2014-08-06 18:50:12,215 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015973: Starting subdeployment (runtime-name: "metadata-svc-dev-ejb-wildfly-SNAPSHOT.jar")

      2014-08-06 18:50:12,224 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015973: Starting subdeployment (runtime-name: "metadata-svc-web-wildfly-SNAPSHOT.war")

      2014-08-06 18:50:12,455 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016002: Processing weld deployment metadata-svc-ear-wildfly-SNAPSHOT.ear

      2014-08-06 18:50:12,488 INFO  [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016002: Processing weld deployment metadata-svc-web-wildfly-SNAPSHOT.war

      2014-08-06 18:50:12,501 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-2) JNDI bindings for session bean named Initializer in deployment unit subdeployment "metadata-svc-web-wildfly-SNAPSHOT.war" of deployment "metadata-svc-ear-wildfly-SNAPSHOT.ear" are as follows:

       

          java:global/metadata-svc/metadata-svc-web-wildfly-SNAPSHOT/Initializer!com.mycompany.sso.saml.service.Initializer

          java:app/metadata-svc-web-wildfly-SNAPSHOT/Initializer!com.mycompany.sso.saml.service.Initializer

          java:module/Initializer!com.mycompany.sso.saml.service.Initializer

          java:global/metadata-svc/metadata-svc-web-wildfly-SNAPSHOT/Initializer

          java:app/metadata-svc-web-wildfly-SNAPSHOT/Initializer

          java:module/Initializer

       

      2014-08-06 18:50:12,519 INFO  [org.jboss.weld.deployer] (MSC service thread 1-3) JBAS016002: Processing weld deployment metadata-svc-dev-ejb-wildfly-SNAPSHOT.jar

      2014-08-06 18:50:12,521 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-3) JNDI bindings for session bean named MetadataServiceDaoBean in deployment unit subdeployment "metadata-svc-dev-ejb-wildfly-SNAPSHOT.jar" of deployment "metadata-svc-ear-wildfly-SNAPSHOT.ear" are as follows:

       

          java:global/metadata-svc/metadata-svc-ejb/MetadataServiceDaoBean!com.mycompany.sso.saml.dao.MetadataServiceDaoLocal

          java:app/metadata-svc-ejb/MetadataServiceDaoBean!com.mycompany.sso.saml.dao.MetadataServiceDaoLocal

          java:module/MetadataServiceDaoBean!com.mycompany.sso.saml.dao.MetadataServiceDaoLocal

          java:global/metadata-svc/metadata-svc-ejb/MetadataServiceDaoBean

          java:app/metadata-svc-ejb/MetadataServiceDaoBean

          java:module/MetadataServiceDaoBean

       

      2014-08-06 18:50:12,522 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-3) JNDI bindings for session bean named MockProvidersHolder in deployment unit subdeployment "metadata-svc-dev-ejb-wildfly-SNAPSHOT.jar" of deployment "metadata-svc-ear-wildfly-SNAPSHOT.ear" are as follows:

       

          java:global/metadata-svc/metadata-svc-ejb/MockProvidersHolder!com.mycompany.sso.saml.dao.MockProvidersHolder

          java:app/metadata-svc-ejb/MockProvidersHolder!com.mycompany.sso.saml.dao.MockProvidersHolder

          java:module/MockProvidersHolder!com.mycompany.sso.saml.dao.MockProvidersHolder

          java:global/metadata-svc/metadata-svc-ejb/MockProvidersHolder

          java:app/metadata-svc-ejb/MockProvidersHolder

          java:module/MockProvidersHolder

       

      2014-08-06 18:50:12,541 INFO  [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016005: Starting Services for CDI deployment: metadata-svc-ear-wildfly-SNAPSHOT.ear

      2014-08-06 18:50:12,554 INFO  [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016008: Starting weld service for deployment metadata-svc-ear-wildfly-SNAPSHOT.ear

      2014-08-06 18:50:12,819 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."metadata-svc-ear-wildfly-SNAPSHOT.ear".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."metadata-svc-ear-wildfly-SNAPSHOT.ear".WeldStartService: Failed to start service

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]

          at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

      Caused by: org.jboss.msc.service.ServiceNotFoundException: Service service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-dev-ejb-wildfly-SNAPSHOT.jar".component.MetadataServiceDaoBean.VIEW."com.mycompany.sso.saml.dao.MetadataServiceDaoLocal".LOCAL not found

          at org.jboss.msc.service.ServiceContainerImpl.getRequiredService(ServiceContainerImpl.java:668) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]

          at org.jboss.as.weld.services.bootstrap.WeldEjbInjectionServices.getComponentView(WeldEjbInjectionServices.java:149)

          at org.jboss.as.weld.services.bootstrap.WeldEjbInjectionServices.handleServiceLookup(WeldEjbInjectionServices.java:124)

          at org.jboss.as.weld.services.bootstrap.WeldEjbInjectionServices.registerEjbInjectionPoint(WeldEjbInjectionServices.java:106)

          at org.jboss.weld.injection.ResourceInjectionFactory$EjbResourceInjectionProcessor.getResourceReferenceFactory(ResourceInjectionFactory.java:243)

          at org.jboss.weld.injection.ResourceInjectionFactory$EjbResourceInjectionProcessor.getResourceReferenceFactory(ResourceInjectionFactory.java:238)

          at org.jboss.weld.injection.ResourceInjectionFactory$ResourceInjectionProcessor.createFieldResourceInjection(ResourceInjectionFactory.java:206)

          at org.jboss.weld.injection.ResourceInjectionFactory$ResourceInjectionProcessor.createResourceInjections(ResourceInjectionFactory.java:182)

          at org.jboss.weld.injection.ResourceInjectionFactory.discoverType(ResourceInjectionFactory.java:405)

          at org.jboss.weld.injection.ResourceInjectionFactory.getResourceInjections(ResourceInjectionFactory.java:92)

          at org.jboss.weld.injection.producer.ResourceInjector.<init>(ResourceInjector.java:52)

          at org.jboss.weld.injection.producer.BeanInjectionTarget.initInjector(BeanInjectionTarget.java:55)

          at org.jboss.weld.injection.producer.BasicInjectionTarget.<init>(BasicInjectionTarget.java:68)

          at org.jboss.weld.injection.producer.BeanInjectionTarget.<init>(BeanInjectionTarget.java:49)

          at org.jboss.weld.manager.InjectionTargetFactoryImpl.chooseInjectionTarget(InjectionTargetFactoryImpl.java:126)

          at org.jboss.weld.manager.InjectionTargetFactoryImpl.createInjectionTarget(InjectionTargetFactoryImpl.java:88)

          at org.jboss.weld.bean.ManagedBean.<init>(ManagedBean.java:91)

          at org.jboss.weld.bean.ManagedBean.of(ManagedBean.java:71)

          at org.jboss.weld.bootstrap.AbstractBeanDeployer.createManagedBean(AbstractBeanDeployer.java:264)

          at org.jboss.weld.bootstrap.BeanDeployer.createClassBean(BeanDeployer.java:248)

          at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$2.doWork(ConcurrentBeanDeployer.java:74)

          at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$2.doWork(ConcurrentBeanDeployer.java:72)

          at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)

          at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)

          at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_45]

          ... 3 more

       

      2014-08-06 18:50:12,932 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 96) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "metadata-svc-ear-wildfly-SNAPSHOT.ear")]) - failure description: {

          "JBAS014671: Failed services" => {"jboss.deployment.unit.\"metadata-svc-ear-wildfly-SNAPSHOT.ear\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"metadata-svc-ear-wildfly-SNAPSHOT.ear\".WeldStartService: Failed to start service

          Caused by: org.jboss.msc.service.ServiceNotFoundException: Service service jboss.deployment.subunit.\"metadata-svc-ear-wildfly-SNAPSHOT.ear\".\"metadata-svc-dev-ejb-wildfly-SNAPSHOT.jar\".component.MetadataServiceDaoBean.VIEW.\"com.mycompany.sso.saml.dao.MetadataServiceDaoLocal\".LOCAL not found"},

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

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean.HandleDelegate is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean]",

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean.ORB is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean]",

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder.InAppClientContainer is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder]",

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean.ValidatorFactory is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean]",

              "jboss.deployment.subunit.\"metadata-svc-ear-wildfly-SNAPSHOT.ear\".\"metadata-svc-dev-ejb-wildfly-SNAPSHOT.jar\".weld.weldClassIntrospector is missing [jboss.deployment.subunit.\"metadata-svc-ear-wildfly-SNAPSHOT.ear\".\"metadata-svc-dev-ejb-wildfly-SNAPSHOT.jar\".beanmanager]",

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean.InstanceName is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean]",

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder.InstanceName is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder]",

              "jboss.deployment.unit.\"metadata-svc-ear-wildfly-SNAPSHOT.ear\".deploymentCompleteService is missing [jboss.deployment.subunit.\"metadata-svc-ear-wildfly-SNAPSHOT.ear\".\"metadata-svc-dev-ejb-wildfly-SNAPSHOT.jar\".deploymentCompleteService]",

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder.Validator is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder]",

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder.ORB is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder]",

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder.HandleDelegate is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder]",

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean.InAppClientContainer is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean]",

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean.Validator is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean]",

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder.ValidatorFactory is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder]"

          ]

      }

      2014-08-06 18:50:12,936 ERROR [org.jboss.as.server] (ServerService Thread Pool -- 96) JBAS015870: Deploy of deployment "metadata-svc-ear-wildfly-SNAPSHOT.ear" was rolled back with the following failure message:

      {

          "JBAS014671: Failed services" => {"jboss.deployment.unit.\"metadata-svc-ear-wildfly-SNAPSHOT.ear\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"metadata-svc-ear-wildfly-SNAPSHOT.ear\".WeldStartService: Failed to start service

          Caused by: org.jboss.msc.service.ServiceNotFoundException: Service service jboss.deployment.subunit.\"metadata-svc-ear-wildfly-SNAPSHOT.ear\".\"metadata-svc-dev-ejb-wildfly-SNAPSHOT.jar\".component.MetadataServiceDaoBean.VIEW.\"com.mycompany.sso.saml.dao.MetadataServiceDaoLocal\".LOCAL not found"},

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

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean.HandleDelegate is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean]",

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean.ORB is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean]",

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder.InAppClientContainer is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder]",

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean.ValidatorFactory is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean]",

              "jboss.deployment.subunit.\"metadata-svc-ear-wildfly-SNAPSHOT.ear\".\"metadata-svc-dev-ejb-wildfly-SNAPSHOT.jar\".weld.weldClassIntrospector is missing [jboss.deployment.subunit.\"metadata-svc-ear-wildfly-SNAPSHOT.ear\".\"metadata-svc-dev-ejb-wildfly-SNAPSHOT.jar\".beanmanager]",

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean.InstanceName is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean]",

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder.InstanceName is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder]",

              "jboss.deployment.unit.\"metadata-svc-ear-wildfly-SNAPSHOT.ear\".deploymentCompleteService is missing [jboss.deployment.subunit.\"metadata-svc-ear-wildfly-SNAPSHOT.ear\".\"metadata-svc-dev-ejb-wildfly-SNAPSHOT.jar\".deploymentCompleteService]",

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder.Validator is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder]",

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder.ORB is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder]",

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder.HandleDelegate is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder]",

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean.InAppClientContainer is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean]",

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean.Validator is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean]",

              "jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder.ValidatorFactory is missing [jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder]"

          ]

      }

      2014-08-06 18:50:12,947 INFO  [org.jboss.weld.deployer] (MSC service thread 1-3) JBAS016009: Stopping weld service for deployment metadata-svc-ear-wildfly-SNAPSHOT.ear

      2014-08-06 18:50:12,980 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015974: Stopped subdeployment (runtime-name: metadata-svc-dev-ejb-wildfly-SNAPSHOT.jar) in 43ms

      2014-08-06 18:50:12,984 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015974: Stopped subdeployment (runtime-name: metadata-svc-web-wildfly-SNAPSHOT.war) in 47ms

      2014-08-06 18:50:13,025 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment metadata-svc-ear-wildfly-SNAPSHOT.ear (runtime-name: metadata-svc-ear-wildfly-SNAPSHOT.ear) in 88ms

      2014-08-06 18:50:13,029 INFO  [org.jboss.as.controller] (ServerService Thread Pool -- 96) JBAS014774: Service status report

      JBAS014775:    New missing/unsatisfied dependencies:

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-dev-ejb-wildfly-SNAPSHOT.jar".beanmanager (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-dev-ejb-wildfly-SNAPSHOT.jar".weld.weldClassIntrospector]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-dev-ejb-wildfly-SNAPSHOT.jar".deploymentCompleteService (missing) dependents: [service jboss.deployment.unit."metadata-svc-ear-wildfly-SNAPSHOT.ear".deploymentCompleteService]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".INSTALL (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-dev-ejb-wildfly-SNAPSHOT.jar".INSTALL]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component.Initializer.CREATE (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component.Initializer.START]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component.Initializer.START (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./metadata-svc, service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".moduleDeploymentRuntimeInformationStart, service jboss.undertow.deployment.default-server.default-host./metadata-svc.UndertowDeploymentInfoService]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component.Initializer.VIEW."com.mycompany.sso.saml.service.Initializer".LOCAL (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component.Initializer.START]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component.Initializer.WeldInstantiator (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component.Initializer.START]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component.Initializer.WeldInterceptorBindingsService (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component.Initializer.WeldInstantiator]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component.Initializer.ejb.non-functional-timerservice (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component.Initializer.START]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."com.sun.faces.config.ConfigureListener".CREATE (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."com.sun.faces.config.ConfigureListener".START]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."com.sun.faces.config.ConfigureListener".START (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./metadata-svc, service jboss.undertow.deployment.default-server.default-host./metadata-svc.UndertowDeploymentInfoService]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."com.sun.faces.config.ConfigureListener".WeldInstantiator (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."com.sun.faces.config.ConfigureListener".START]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."javax.faces.webapp.FacetTag".CREATE (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."javax.faces.webapp.FacetTag".START]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."javax.faces.webapp.FacetTag".START (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./metadata-svc, service jboss.undertow.deployment.default-server.default-host./metadata-svc.UndertowDeploymentInfoService]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."javax.faces.webapp.FacetTag".WeldInstantiator (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."javax.faces.webapp.FacetTag".START]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".CREATE (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./metadata-svc, service jboss.undertow.deployment.default-server.default-host./metadata-svc.UndertowDeploymentInfoService]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".WeldInstantiator (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".CREATE (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./metadata-svc, service jboss.undertow.deployment.default-server.default-host./metadata-svc.UndertowDeploymentInfoService]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".WeldInstantiator (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."org.jboss.weld.servlet.WeldInitialListener".CREATE (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."org.jboss.weld.servlet.WeldInitialListener".START]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."org.jboss.weld.servlet.WeldInitialListener".START (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./metadata-svc, service jboss.undertow.deployment.default-server.default-host./metadata-svc.UndertowDeploymentInfoService]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."org.jboss.weld.servlet.WeldInitialListener".WeldInstantiator (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."org.jboss.weld.servlet.WeldInitialListener".START]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."org.jboss.weld.servlet.WeldTerminalListener".CREATE (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."org.jboss.weld.servlet.WeldTerminalListener".START]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."org.jboss.weld.servlet.WeldTerminalListener".START (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./metadata-svc, service jboss.undertow.deployment.default-server.default-host./metadata-svc.UndertowDeploymentInfoService]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."org.jboss.weld.servlet.WeldTerminalListener".WeldInstantiator (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."org.jboss.weld.servlet.WeldTerminalListener".START]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".deploymentCompleteService (missing) dependents: [service jboss.deployment.unit."metadata-svc-ear-wildfly-SNAPSHOT.ear".deploymentCompleteService, service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-dev-ejb-wildfly-SNAPSHOT.jar".INSTALL]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".ee.ComponentRegistry (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./metadata-svc.UndertowDeploymentInfoService]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".jndiDependencyService (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."org.jboss.weld.servlet.WeldTerminalListener".START, service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."javax.faces.webapp.FacetTag".START, service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START, service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START, JBAS014799: ... and 4 more ]

            service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".moduleDeploymentRuntimeInformation (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".moduleDeploymentRuntimeInformationStart, service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".component.Initializer.START]

            service jboss.deployment.unit."metadata-svc-ear-wildfly-SNAPSHOT.ear".WeldBootstrapService (missing) dependents: [service jboss.deployment.unit."metadata-svc-ear-wildfly-SNAPSHOT.ear".CdiValidatorFactoryService]

            service jboss.deployment.unit."metadata-svc-ear-wildfly-SNAPSHOT.ear".WeldStartService (missing) dependents: [service jboss.deployment.unit."metadata-svc-ear-wildfly-SNAPSHOT.ear".CdiValidatorFactoryService]

            service jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean (missing) dependents: [service jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean.InstanceName, service jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean.Validator, service jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean.InAppClientContainer, service jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MetadataServiceDaoBean.ORB, JBAS014799: ... and 3 more ]

            service jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder (missing) dependents: [service jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder.Validator, service jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder.InAppClientContainer, service jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder.ValidatorFactory, service jboss.naming.context.java.comp.metadata-svc.metadata-svc-ejb.MockProvidersHolder.HandleDelegate, JBAS014799: ... and 3 more ]

            service jboss.naming.context.java.module.metadata-svc.metadata-svc-ejb (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-dev-ejb-wildfly-SNAPSHOT.jar".INSTALL]

            service jboss.undertow.deployment.default-server.default-host./metadata-svc (missing) dependents: [service jboss.deployment.subunit."metadata-svc-ear-wildfly-SNAPSHOT.ear"."metadata-svc-web-wildfly-SNAPSHOT.war".deploymentCompleteService]

            service jboss.undertow.deployment.default-server.default-host./metadata-svc.UndertowDeploymentInfoService (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./metadata-svc]

            service jboss.undertow.deployment.default-server.default-host./metadata-svc.codec (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./metadata-svc.UndertowDeploymentInfoService]

      JBAS014777:   Services which failed to start:      service jboss.deployment.unit."metadata-svc-ear-wildfly-SNAPSHOT.ear".WeldStartService

        • 1. Re: Local EJB interface in jar in ear/lib cannot be resolved
          Chris Slater Newbie

          I simplified my project to test this case.  The source and ear are attached.  Note: The ear works after some investigation.

           

          How the EJB is injected seems to matter.  Here is what I found out:

           

          //Scenario 1: basic @EJB
          //Works with Glassfish, not with Wildfly
          @EJB
          private TestLocal bean;

             

          //Scenario 2: @EJB with lookup
          //Does not work with Wildfly, not tested on Glassfish
          @EJB(lookup = "java:app/test-svc-ejb/TestBean!test.wildfly.TestLocal")
          private TestLocal bean;

             

          //Scenario 3: Manual JNDI lookup
          //Works on Wildfly
          private TestLocal bean;
          @PostConstruct
          private void postConstruct() {
              try {
                  bean = (TestLocal) InitialContext.doLookup("java:app/test-svc-ejb/TestBean!test.wildfly.TestLocal");
              } catch (NamingException ex) {
                  Logger.getLogger(TestServlet.class.getName()).log(Level.SEVERE, null, ex);
              }
          }

             

          //Scenario 4: using @Inject
          //Works with Wildfly (I'm suprised!)
          @Inject
          private TestLocal bean;

             

          //Scenario 5: using @Resource
          //Does not work with Wildfly
          @Resource(lookup = "java:app/test-svc-ejb/TestBean!test.wildfly.TestLocal")
          private TestLocal bean;

           

           

          I'm still curious if the basic @EJB injection is a bug.  It seems like it to me

          • 2. Re: Local EJB interface in jar in ear/lib cannot be resolved
            jaikiran pai Master

            What happens when you remove the:

             

            <initialize-in-order>true</initialize-in-order>


            in the application.xml or switch the order in the application.xml by listing the ejb module first and then the war module?

            • 3. Re: Local EJB interface in jar in ear/lib cannot be resolved
              Chris Slater Newbie

              Thank you Jaikiran Pai!

               

              I switched the order of the ejb and war and it worked.  I missed that.

               

              My project used the maven ear plugin with some extra configuration for the war and a profile that excluded an ejb.  I had assumed it was working like my other projects.  Once I removed that customization logic, the modules were put in the correct order. 

               

              Now off to figure out what went wrong in the plugin...