0 Replies Latest reply on Jul 16, 2018 3:39 AM by noriyuki matsuda

    CDI bean is not injected from the other jar file in WF13

    noriyuki matsuda Newbie

      I'm trying to upgrade from WF11 to WF13, however I can't understand why a CDI bean is not injected from the other jar file.

       

      Is there a nessesary setting of solve this problem?

      In WF11 there is no problem.

       

      The jboss-deployment-structure.xml and classes are look like this:

       

      [1] base-logging-1.2.0.jar

           META-INF/beans.xml

       

           @Dependent
           public class Test {
                public void exec() {
                     System.out.println("Test.exec()");
                }
           }

       

      [2] base-view-1.2.0.jar

           @Dependent
           public class TestExec {
                @Inject
                private Test _test;
           }

       

           META-INF/jboss-deployment-structure.xml

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">

          <deployment>

              <dependencies>

                <module name="deployment.base-logging-1.2.0.jar" />

                </dependencies>

          </deployment>

      </jboss-deployment-structure>

       

      error message is this

      16:24:50,124 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.deployment.unit."base-view-1.2.0.jar".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."base-view-1.2.0.jar".WeldStartService: Failed to start service
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1728)
      at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1556)
      at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
      at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
      at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type Test with qualifiers @Default
        at injection point [BackedAnnotatedField] @Inject private asia.tob.base.view.TestExec._test
        at asia.tob.base.view.TestExec._test(TestExec.java:0)
      
      
      at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:378)
      at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:290)
      at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:143)
      at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:164)
      at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:526)
      at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:64)
      at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:62)
      at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:62)
      at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:55)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      at org.jboss.threads.JBossThread.run(JBossThread.java:485)
      
      
      16:24:50,136 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) WFLYCTL0013: Operation ("full-replace-deployment") failed - address: ([]) - failure description: {
          "WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"base-view-1.2.0.jar\".WeldStartService" => "Failed to start service
          Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type Test with qualifiers @Default
        at injection point [BackedAnnotatedField] @Inject private asia.tob.base.view.TestExec._test
        at asia.tob.base.view.TestExec._test(TestExec.java:0)
      "},
          "WFLYCTL0288: 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.unit.\"base-view-1.2.0.jar\".CdiValidatorFactoryService",
                  "jboss.deployment.unit.\"base-view-1.2.0.jar\".component.DialogConversation.WeldInterceptorBindingsService",
                  "jboss.deployment.unit.\"base-view-1.2.0.jar\".weld.weldClassIntrospector"
              ],
              "Services that may be the cause:" => [
                  "jboss.clustering.web.route.default-server",
                  "jboss.deployment.unit.\"base-view-1.2.0.jar\".component.DialogConversation.START",
                  "jboss.deployment.unit.\"base-view-1.2.0.jar\".component.DialogConversation.WeldInstantiator",
                  "jboss.deployment.unit.\"base-view-1.2.0.jar\".component.DialogConversation.WeldInterceptorBindingsService",
                  "jboss.deployment.unit.\"base-view-1.2.0.jar\".weld.weldClassIntrospector",
                  "jboss.txn.service.remote",
                  "jboss.xts.handlers",
                  "org.wildfly.clustering.cache.default-service-provider-registry.ejb",
                  "org.wildfly.clustering.cache.default-service-provider-registry.web",
                  "org.wildfly.clustering.cache.group.ejb.passivation",
                  "org.wildfly.clustering.cache.group.hibernate.entity",
                  "org.wildfly.clustering.cache.group.hibernate.local-query",
                  "org.wildfly.clustering.cache.group.hibernate.timestamps",
                  "org.wildfly.clustering.cache.group.server.client-mappings",
                  "org.wildfly.clustering.cache.group.server.default",
                  "org.wildfly.clustering.cache.group.web.client-mappings",
                  "org.wildfly.clustering.cache.group.web.default-server",
                  "org.wildfly.clustering.cache.group.web.passivation",
                  "org.wildfly.clustering.cache.registry.ejb.passivation",
                  "org.wildfly.clustering.cache.registry.server.default",
                  "org.wildfly.clustering.cache.registry.web.passivation",
                  "org.wildfly.clustering.cache.registry-entry.ejb.passivation",
                  "org.wildfly.clustering.cache.registry-entry.hibernate.entity",
                  "org.wildfly.clustering.cache.registry-entry.hibernate.local-query",
                  "org.wildfly.clustering.cache.registry-entry.hibernate.timestamps",
                  "org.wildfly.clustering.cache.registry-entry.server.client-mappings",
                  "org.wildfly.clustering.cache.registry-entry.server.default",
                  "org.wildfly.clustering.cache.registry-entry.web.client-mappings",
                  "org.wildfly.clustering.cache.registry-entry.web.default-server",
                  "org.wildfly.clustering.cache.registry-entry.web.passivation",
                  "org.wildfly.clustering.cache.registry-factory.ejb.passivation",
                  "org.wildfly.clustering.cache.registry-factory.hibernate.entity",
                  "org.wildfly.clustering.cache.registry-factory.hibernate.local-query",
                  "org.wildfly.clustering.cache.registry-factory.hibernate.timestamps",
                  "org.wildfly.clustering.cache.registry-factory.server.client-mappings",
                  "org.wildfly.clustering.cache.registry-factory.server.default",
                  "org.wildfly.clustering.cache.registry-factory.web.client-mappings",
                  "org.wildfly.clustering.cache.registry-factory.web.default-server",
                  "org.wildfly.clustering.cache.registry-factory.web.passivation",
                  "org.wildfly.clustering.cache.service-provider-registry.ejb.client-mappings",
                  "org.wildfly.clustering.cache.service-provider-registry.ejb.passivation",
                  "org.wildfly.clustering.cache.service-provider-registry.hibernate.entity",
                  "org.wildfly.clustering.cache.service-provider-registry.hibernate.local-query",
                  "org.wildfly.clustering.cache.service-provider-registry.hibernate.timestamps",
                  "org.wildfly.clustering.cache.service-provider-registry.server.client-mappings",
                  "org.wildfly.clustering.cache.service-provider-registry.server.default",
                  "org.wildfly.clustering.cache.service-provider-registry.web.client-mappings",
                  "org.wildfly.clustering.cache.service-provider-registry.web.default-server",
                  "org.wildfly.clustering.cache.service-provider-registry.web.passivation",
                  "org.wildfly.clustering.command-dispatcher-factory.ejb",
                  "org.wildfly.clustering.command-dispatcher-factory.hibernate",
                  "org.wildfly.clustering.command-dispatcher-factory.local",
                  "org.wildfly.clustering.command-dispatcher-factory.server",
                  "org.wildfly.clustering.command-dispatcher-factory.web",
                  "org.wildfly.clustering.default-command-dispatcher-factory",
                  "org.wildfly.clustering.group.hibernate",
                  "org.wildfly.clustering.group.server",
                  "org.wildfly.clustering.group.web",
                  "org.wildfly.clustering.infinispan.cache.ejb.passivation",
                  "org.wildfly.clustering.infinispan.cache.hibernate.entity",
                  "org.wildfly.clustering.infinispan.cache.hibernate.local-query",
                  "org.wildfly.clustering.infinispan.cache.hibernate.timestamps",
                  "org.wildfly.clustering.infinispan.cache.server.client-mappings",
                  "org.wildfly.clustering.infinispan.cache.server.default",
                  "org.wildfly.clustering.infinispan.cache.store.hibernate.entity",
                  "org.wildfly.clustering.infinispan.cache.store.hibernate.local-query",
                  "org.wildfly.clustering.infinispan.cache.store.hibernate.timestamps",
                  "org.wildfly.clustering.infinispan.cache.store.server.default",
                  "org.wildfly.clustering.infinispan.cache.store.web.passivation",
                  "org.wildfly.clustering.infinispan.cache.web.client-mappings",
                  "org.wildfly.clustering.infinispan.cache.web.default-server",
                  "org.wildfly.clustering.infinispan.cache.web.passivation",
                  "org.wildfly.clustering.infinispan.cache-configuration.hibernate.entity",
                  "org.wildfly.clustering.infinispan.cache-configuration.hibernate.entity.expiration",
                  "org.wildfly.clustering.infinispan.cache-configuration.hibernate.entity.locking",
                  "org.wildfly.clustering.infinispan.cache-configuration.hibernate.entity.memory",
                  "org.wildfly.clustering.infinispan.cache-configuration.hibernate.entity.transaction",
                  "org.wildfly.clustering.infinispan.cache-configuration.hibernate.local-query",
                  "org.wildfly.clustering.infinispan.cache-configuration.hibernate.local-query.expiration",
                  "org.wildfly.clustering.infinispan.cache-configuration.hibernate.local-query.locking",
                  "org.wildfly.clustering.infinispan.cache-configuration.hibernate.local-query.memory",
                  "org.wildfly.clustering.infinispan.cache-configuration.hibernate.local-query.transaction",
                  "org.wildfly.clustering.infinispan.cache-configuration.hibernate.timestamps",
                  "org.wildfly.clustering.infinispan.cache-configuration.hibernate.timestamps.expiration",
                  "org.wildfly.clustering.infinispan.cache-configuration.hibernate.timestamps.locking",
                  "org.wildfly.clustering.infinispan.cache-configuration.hibernate.timestamps.memory",
                  "org.wildfly.clustering.infinispan.cache-configuration.hibernate.timestamps.transaction",
                  "org.wildfly.clustering.infinispan.cache-configuration.server.client-mappings",
                  "org.wildfly.clustering.infinispan.cache-configuration.server.default",
                  "org.wildfly.clustering.infinispan.cache-configuration.server.default.expiration",
                  "org.wildfly.clustering.infinispan.cache-configuration.server.default.locking",
                  "org.wildfly.clustering.infinispan.cache-configuration.server.default.memory",
                  "org.wildfly.clustering.infinispan.cache-configuration.server.default.transaction",
                  "org.wildfly.clustering.infinispan.cache-configuration.web.client-mappings",
                  "org.wildfly.clustering.infinispan.cache-configuration.web.default-server",
                  "org.wildfly.clustering.infinispan.cache-configuration.web.passivation",
                  "org.wildfly.clustering.infinispan.cache-configuration.web.passivation.expiration",
                  "org.wildfly.clustering.infinispan.cache-configuration.web.passivation.locking",
                  "org.wildfly.clustering.infinispan.cache-configuration.web.passivation.memory",
                  "org.wildfly.clustering.infinispan.cache-configuration.web.passivation.transaction",
                  "org.wildfly.clustering.infinispan.cache-configuration.web.passivation.write",
                  "org.wildfly.clustering.infinispan.cache-container.hibernate",
                  "org.wildfly.clustering.infinispan.cache-container.server",
                  "org.wildfly.clustering.infinispan.cache-container.web",
                  "org.wildfly.clustering.infinispan.cache-container-configuration.hibernate",
                  "org.wildfly.clustering.infinispan.cache-container-configuration.hibernate.transport",
                  "org.wildfly.clustering.infinispan.cache-container-configuration.server",
                  "org.wildfly.clustering.infinispan.cache-container-configuration.server.transport",
                  "org.wildfly.clustering.infinispan.cache-container-configuration.web",
                  "org.wildfly.clustering.infinispan.cache-container-configuration.web.transport",
                  "org.wildfly.clustering.infinispan.default-cache.ejb",
                  "org.wildfly.clustering.infinispan.default-cache.web",
                  "org.wildfly.clustering.infinispan.default-cache-configuration.server",
                  "org.wildfly.clustering.infinispan.default-cache-configuration.web"
              ]
          }
      }

       

      thank you,