Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1175272 - CDI fails when both remote and embedded uber-jar are present
CDI fails when both remote and embedded uber-jar are present
Status: VERIFIED
Product: JBoss Data Grid 6
Classification: JBoss
Component: Build, Infinispan (Show other bugs)
6.4.0
Unspecified Unspecified
unspecified Severity medium
: ER2
: 6.6.0
Assigned To: Sebastian Łaskawiec
Martin Gencur
:
Depends On: 1278424
Blocks:
  Show dependency treegraph
 
Reported: 2014-12-17 07:14 EST by Martin Gencur
Modified: 2016-01-26 08:30 EST (History)
9 users (show)

See Also:
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:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker ISPN-5092 Major Closed CDI fails when both remote and embedded uber-jar are present 2016-05-24 03:08 EDT

  None (edit)
Description Martin Gencur 2014-12-17 07:14:11 EST
See https://issues.jboss.org/browse/ISPN-5092
Comment 2 Sebastian Łaskawiec 2015-01-16 08:08:32 EST
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
Comment 3 JBoss JIRA Server 2015-04-09 09:59:01 EDT
Sebastian Łaskawiec <slaskawi@redhat.com> updated the status of jira ISPN-5092 to Closed
Comment 4 Tomas Sykora 2015-04-10 10:15:35 EDT
Looks like worth commenting here. IIRC we need both uber-jars at class path in remote cache store scenario.
Comment 7 Sebastian Łaskawiec 2015-11-04 04:16:31 EST
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.
Comment 8 Sebastian Łaskawiec 2015-11-05 08:59:54 EST
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.
Comment 9 Martin Gencur 2015-11-05 09:01:40 EST
Cannot be verified without https://bugzilla.redhat.com/show_bug.cgi?id=1278424 being fixed.
Comment 11 Martin Gencur 2015-11-19 04:51:42 EST
Looks good in ER2.

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