Bug 1255035 - Individual modules do not work with uberjars
Summary: Individual modules do not work with uberjars
Keywords:
Status: NEW
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: Build, Infinispan
Version: 6.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 7.0.0
Assignee: Tristan Tarrant
QA Contact: Martin Gencur
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-19 13:18 UTC by Jakub Markos
Modified: 2023-09-30 08:28 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker ISPN-5193 0 Blocker Resolved infinispan-embedded and infinispan-cli-interpreter don't work together 2016-11-18 08:15:26 UTC

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.


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