Bug 1255035

Summary: Individual modules do not work with uberjars
Product: [JBoss] JBoss Data Grid 6 Reporter: Jakub Markos <jmarkos>
Component: Build, InfinispanAssignee: Tristan Tarrant <ttarrant>
Status: NEW --- QA Contact: Martin Gencur <mgencur>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.6.0CC: jdg-bugs
Target Milestone: ---   
Target Release: 7.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
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: --- Target Upstream Version:
Embargoed:

Description Jakub Markos 2015-08-19 13:18:57 UTC
Please see the linked JIRA.

Comment 2 Martin Gencur 2015-08-26 12:28:34 UTC
Hi Jakub,
can you describe the goal here? The uber jars should not be combined with individual jars. They're supposed to replace them. For CLI we have a separate uber jar.
This looks to me like a wrong use case and not a real bug. But I'd like to get more details.
If you need to combine them for some reason and you use Maven, make sure the transitive dependencies don't pull in additional jar files that are already included in the uber jar.

Comment 3 Jakub Markos 2015-08-27 08:39:50 UTC
Hi,
they need to be combined for the remote cache store invm test - one node needs to start the hotrod server, which is only available as an individual jar and is not in either uberjar. Also the other node needs to use the hotrod client, but neither the individual jar (because of this bug) or the remote uberjar (https://bugzilla.redhat.com/show_bug.cgi?id=1175272) works.
The spring integration is also available only as an individual jar, but it doesn't have its own log implementation, so the spring tests pass.

Comment 5 Sebastian Łaskawiec 2015-09-16 13:52:53 UTC
This issue requires changing uberjar contents (which is not backwards compatible) and needs to be postponed till JBoss Data Grid 7 release.

Uber jars should be self-contained and should not require any other dependencies (apart from specification jars e.g. JCache). However this might lead to a problem where duplicate classes might be found on classpath [1] (e.g. embedded and remote Uber Jars might contain infinispan-core). This in turn violates CDI specification which forbids exposing the same bean in more than one archive [2].

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1175272
[2] http://docs.jboss.org/cdi/spec/1.0/html_single/#beanarchive ("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.")

Comment 6 JBoss JIRA Server 2016-09-29 07:30:52 UTC
Sebastian Łaskawiec <slaskawi> updated the status of jira ISPN-5193 to Resolved

Comment 7 Sebastian Łaskawiec 2016-09-29 07:33:37 UTC
As I mentioned in [1], uber jars cover most of the cases but in some rare occasions they will fail. In such cases one should use Small Jars.

Marking this issue as ON_QA.

[1] https://issues.jboss.org/browse/ISPN-5193

Comment 8 Sebastian Łaskawiec 2016-09-29 07:35:38 UTC
Unfortunately there are no proper version nor milestone. Leaving it in NEW state.