Bug 1080433
| Summary: | Weld is not able to inject classes from infinispan-cdi module | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Data Grid 6 | Reporter: | Vojtech Juranek <vjuranek> | ||||
| Component: | EAP modules | Assignee: | Tristan Tarrant <ttarrant> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | Martin Gencur <mgencur> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 6.3.0 | CC: | afield, dmehra, mgencur, mmarkus | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-03-26 16:14:06 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Additional info: tested on EAP 6.2.1 with DR1 modules. Possible workaround: add explicit import of META-INF, i.e. add <module name="org.infinispan.cdi" slot="jdg-6.3" meta-inf="import" /> into jboss-deplyment-structure.xml As I'm not completely sure, if the workaround above is workaround or actually correct approach, keeping this BZ open - IMHO it should work out of the box, without adding anything, just listing required modules (i.e. it's a bug) I'd say this is really the correct approach to import beans from outside your deployment as described at https://docs.jboss.org/author/display/WFLY8/CDI+Reference It seems there's really no way how to achieve that modules beans will be visible for the deployment other than deployment will import it itself - closing as not a bug. |
Created attachment 878448 [details] reproducer Description of problem: Weld is not able to inject classes from infinispan-cid module and fails with exception listed bellow. When infinispan-cdi library is added to the war file, everything works as expected. How reproducible: Build and deploy attached web app. It's Infinispan CDI tutorial app with removed libs which are now included as EAP modules and added is jboss-deployment-structure.xml file to activate appropriate modules. Actual results: Deployment of web app fails with 13:21:17,367 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."infinispan-cdi.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."infinispan-cdi.war".WeldStartService: Failed to start service at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1] 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.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [InfinispanExtension] with qualifiers [@Default] at injection point [[parameter 1] of [constructor] @Inject public org.infinispan.jcache.annotation.InjectedCacheResolver(InfinispanExtension, BeanManager)] 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:64) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1] ... 3 more Expected results: Web app is deployed without any errors and works