Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1266831

Summary: Spring package split into remote and embedded
Product: [JBoss] JBoss Data Grid 6 Reporter: Sebastian Łaskawiec <slaskawi>
Component: InfinispanAssignee: Tristan Tarrant <ttarrant>
Status: CLOSED UPSTREAM QA Contact: Martin Gencur <mgencur>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.6.0CC: afield, jdg-bugs, ttarrant
Target Milestone: ER3   
Target Release: 6.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-02-10 03:48:14 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:

Description Sebastian Łaskawiec 2015-09-28 06:57:51 UTC
Description of problem:
Connected issue: https://bugzilla.redhat.com/show_bug.cgi?id=1264840

Currently Spring package contains references to both Remote and Embedded JDG classes. This causes many problems like BZ1264840. The best way to deal with it is to split Uber Jar Spring package into two pieces - remote and embedded.

Comment 7 Vaclav Dedik 2015-12-01 09:35:08 UTC
Looks like class org.infinispan.commons.logging.BasicLogFactory is loaded twice from two packages, once from infinispan-commons (transitive dependency of infinispan-spring4-remtote) and once from infinispan-remote. The class in infinispan-remote is modified by prefixing org.jboss.logging.BasicLogger with "infinispan." -> infinispan.org.jboss.logging.BasicLogger.

So when spring is loading ConsistentHashV1 from hotrod client, it hits the line where:

private static final BasicLogger log = BasicLogFactory.getLog(ConsistentHashV1.class);

The problem is that it picks up BasicLoggerFactory from infinispan-commons, which returns org.jboss.logging.BasicLogger, but the hotrod client is from infinispan-remote, which means it requires infinispan.org.jboss.logging.BasicLogger. If you exclude infinispan-commons from infinispan-spring4-remote, it works. If you move the dependency declaration of infinispan-spring4-remote in pom.xml below infinispan-remote, it works as well, my guess is that spring picks up the class that is added on the class path first.

So while I think I understand exactly what is going on, I am not yet sure how to fix this, therefore moving target milestone to CR1.

Comment 8 Sebastian Łaskawiec 2015-12-01 12:09:48 UTC
Changing severity to low since there is an easy work around:

Switch the order of dependencies (uber jar needs to go first - classpath is being scanned from left to right):

<dependency>
  <groupId>org.infinispan</groupId>
  <artifactId>infinispan-remote</artifactId>
  <version>6.4.0-redhat-SNAPSHOT</version>
  </dependency>
<dependency>
  <groupId>org.infinispan</groupId>
  <artifactId>infinispan-spring4-remote</artifactId>
  <version>6.4.0-redhat-SNAPSHOT</version>
</dependency>

Comment 12 Red Hat Bugzilla 2025-02-10 03:48:14 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.