Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-6636

WELD-001408: Unsatisfied dependencies on hot deploy of app using module-alias as dependency

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 10.0.0.Final
    • CDI / Weld
    • None
    • Hide

      Use the sub deployment module name instead of the module-alias or stop JBoss, deploy, restart. Though the use case of module-alias is to deal with maven changing version #'s of sub deployments.

      Show
      Use the sub deployment module name instead of the module-alias or stop JBoss, deploy, restart. Though the use case of module-alias is to deal with maven changing version #'s of sub deployments.

      If a sub deployment uses another sub deployment's module-alias as a dependency, it will deploy successfully, but if hot deployed, it will fail with the error below. Attached reproducer.

      <?xml version="1.0" encoding="UTF-8"?>
      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
          <ear-subdeployments-isolated>true</ear-subdeployments-isolated>
      
          <sub-deployment name="ejb1.jar">
              <module-alias name="deployment.ejb1"/>
          </sub-deployment>
          <sub-deployment name="ejb2.jar">
              <dependencies>
      <!-- works
                  <module name="deployment.test.ear.ejb1.jar" slot="main"/>
      -->
      <!-- fails with  WELD-001408: Unsatisfied dependencies for type TestEJB1 with qualifiers @Default on redeploy / hot deploy -->
                  <module name="deployment.ejb1" slot="main"/>
              </dependencies>
          </sub-deployment>
      </jboss-deployment-structure>
      
      10:43:42,140 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."test.ear".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."test.ear".WeldStartService: Failed to start service
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904)
      	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)
      Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type TestEJB1 with qualifiers @Default
        at injection point [BackedAnnotatedField] @Inject private test.TestEJB2.test1
        at test.TestEJB2.test1(TestEJB2.java:0)
      
      	at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:359)
      	at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:281)
      	at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134)
      	at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:155)
      	at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:518)
      	at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
      	at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)
      	at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:63)
      	at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:56)
      	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:320)
      
      10:43:42,144 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.\"test.ear\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"test.ear\".WeldStartService: Failed to start service
          Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type TestEJB1 with qualifiers @Default
        at injection point [BackedAnnotatedField] @Inject private test.TestEJB2.test1
        at test.TestEJB2.test1(TestEJB2.java:0)
      "}}
      

        1. test.ear
          3 kB
          Brad Maxwell

              thofman Tomas Hofman
              rhn-support-bmaxwell Brad Maxwell
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: