Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1338093 - [GSS](6.4.z) WELD-001408: Unsatisfied dependencies on hot deploy of app using module-alias as dependency
Summary: [GSS](6.4.z) WELD-001408: Unsatisfied dependencies on hot deploy of app using...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Other
Version: 6.4.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR1
: EAP 6.4.14
Assignee: jboss-set
QA Contact: Pavel Slavicek
eap-docs
URL:
Whiteboard:
Depends On:
Blocks: 1347306 eap6414-payload
TreeView+ depends on / blocked
 
Reported: 2016-05-21 16:00 UTC by Brad Maxwell
Modified: 2020-04-15 14:29 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-23 08:25:43 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBEAP-4650 0 Major Verified [GSS](7.0.z) Unsatisfied dependencies on hot deploy of app using module-alias as dependency 2018-04-17 08:29:35 UTC
Red Hat Issue Tracker JBEAP-8617 0 Major Verified [GSS](7.1.0) Unsatisfied dependencies on hot deploy of app using module-alias as dependency 2018-04-17 08:29:35 UTC
Red Hat Issue Tracker MODULES-241 0 Major Resolved Leaked Alias Modules 2018-04-17 08:29:35 UTC
Red Hat Issue Tracker WFLY-6636 0 Major Open WELD-001408: Unsatisfied dependencies on hot deploy of app using module-alias as dependency 2018-04-17 08:29:35 UTC
Red Hat Knowledge Base (Solution) 2326271 0 None None None 2016-05-21 16:03:52 UTC

Description Brad Maxwell 2016-05-21 16:00:34 UTC
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:59:16,284 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) 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:1936) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_60]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [TestEJB1] with qualifiers [@Default] at injection point [[field] @Inject private test.TestEJB2.test1]
	at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:315)
	at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:284)
	at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:147)
	at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:167)
	at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:386)
	at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:371)
	at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:379)
	at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:65)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
	... 3 more


Note if you just undeploy instead of hot deploy this NPE happens, which could be related

10:59:49,103 ERROR [org.jboss.msc.service] (MSC service thread 1-2) MSC000002: Invocation of listener "org.jboss.as.server.moduleservice.ServiceModuleLoader$ModuleSpecLoadListener@4806eb9e" failed: java.lang.NullPointerException
	at org.jboss.modules.ModuleLoader$FutureModule.access$400(ModuleLoader.java:645) [jboss-modules.jar:1.3.7.Final-redhat-1]
	at org.jboss.modules.ModuleLoader.unloadModuleLocal(ModuleLoader.java:435) [jboss-modules.jar:1.3.7.Final-redhat-1]
	at org.jboss.as.server.moduleservice.ServiceModuleLoader.access$200(ServiceModuleLoader.java:58) [jboss-as-server-7.5.7.Final-redhat-3.jar:7.5.7.Final-redhat-3]
	at org.jboss.as.server.moduleservice.ServiceModuleLoader$ModuleSpecLoadListener.transition(ServiceModuleLoader.java:105) [jboss-as-server-7.5.7.Final-redhat-3.jar:7.5.7.Final-redhat-3]
	at org.jboss.msc.service.ServiceControllerImpl.invokeListener(ServiceControllerImpl.java:1565) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
	at org.jboss.msc.service.ServiceControllerImpl.access$2800(ServiceControllerImpl.java:52) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
	at org.jboss.msc.service.ServiceControllerImpl$ListenerTask.run(ServiceControllerImpl.java:2131) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_60]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]

Comment 2 Tomas Remes 2016-05-24 07:15:19 UTC
It seems to me that this is not Weld/CDI issue. In the case when it works the identifier for Module and ModuleDependency is the same but when the alias is used then the ModuleDependency identifier is "deployment.ejb-2:main" which doesn't correspond to "deployment.assembly.ear.ejb-2.jar". David can you please take a look and eventually confirm or refute my understanding?

Comment 3 JBoss JIRA Server 2016-06-01 13:34:32 UTC
Tomas Hofman <thofman@redhat.com> updated the status of jira JBEAP-4650 to Coding In Progress

Comment 4 Vlado Pakan 2016-06-16 13:48:11 UTC
Proposed fix in jboss-modules component: https://github.com/jboss-modules/jboss-modules/pull/91

Comment 5 Vlado Pakan 2016-06-16 14:00:18 UTC
@david.lloyd@redhat.com could you please verify and merge this PR for jboss-moudles: https://github.com/jboss-modules/jboss-modules/pull/91

Comment 7 Yogesh 2016-10-12 12:48:56 UTC
David Do we have any update on this bug?

Comment 9 Peter Palaga 2016-12-01 15:23:24 UTC
Sent a PR to upstream https://github.com/jboss-modules/jboss-modules/pull/118

Comment 13 Matej Novotny 2017-02-17 07:34:06 UTC
Verified with the attached reproducer.

Comment 14 Petr Penicka 2017-03-23 08:25:43 UTC
Released with EAP 6.4.14 on March 14 (ZIPs) and March 22 (RPMs).


Note You need to log in before you can comment on or make changes to this bug.