Bug 1175272
| Summary: | CDI fails when both remote and embedded uber-jar are present | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Data Grid 6 | Reporter: | Martin Gencur <mgencur> |
| Component: | Build, Infinispan | Assignee: | Tristan Tarrant <ttarrant> |
| Status: | CLOSED UPSTREAM | QA Contact: | Martin Gencur <mgencur> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.4.0 | CC: | afield, chuffman, jdg-bugs, tsykora, ttarrant, vjuranek |
| Target Milestone: | ER2 | ||
| Target Release: | 6.6.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Known Issue | |
| Doc Text: |
In Red Hat JBoss Data Grid, when both <parameter>infinispan-remote</parameter> and <parameter>infinispan-embedded</parameter> dependencies are on the classpath, the Infinispan CDI extension does not work as expected. This is due to bundling the Infinispan CDI extension in both jar files. As a result, CDI fails with ambiguous dependencies exception.
This is resolved as of Red Hat JBoss Data Grid 6.6.0. The content of infinispan-embedded and infinispan-remote were restructured so that only one of the jar files is needed for any use case. There is no need to use them together anymore.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2025-02-10 03:43:46 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: | |||
| Bug Depends On: | 1278424 | ||
| Bug Blocks: | |||
|
Description
Martin Gencur
2014-12-17 12:14:11 UTC
Unfortunately bad news on this one - in short it can't be done. I consulted this with Martin Kouba and Jozef Hartinger. They pointed out that CDI Spec states [1]: "If a bean class is deployed in two different bean archives, non-portable behavior results. Portable applications must deploy each bean class in no more than one bean archive." I believe we have at least 2 choices what to do next: 1. Document it as unsupported configuration (my recommendation). 2. Pull the CDI extension out of embedded/remote Uber Jars. This will allow our client to use them both of them and add CDI extension manually. [1] http://docs.jboss.org/cdi/spec/1.0/html_single/#beanarchive Sebastian Łaskawiec <slaskawi> updated the status of jira ISPN-5092 to Closed Looks like worth commenting here. IIRC we need both uber-jars at class path in remote cache store scenario. Unfortunately this issue can not be fully fixed without breaking backward compatibility. An ideal solution would require moving classes from org.infinispan.cdi package into org.infinispan.cdi.common/remote/embedded. Having this in mind we can not fix it entirely in JDG 6.x series (minor releases). However we can do it in JDG7. Unfortunately there is an issue with JCache Annotation extension (mentioned in https://bugzilla.redhat.com/show_bug.cgi?id=1278424) and we can not verify this issue in this milestone. Cannot be verified without https://bugzilla.redhat.com/show_bug.cgi?id=1278424 being fixed. Looks good in ER2. This product has been discontinued or is no longer tracked in Red Hat Bugzilla. |