Bug 1266831
| Summary: | Spring package split into remote and embedded | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Data Grid 6 | Reporter: | Sebastian Łaskawiec <slaskawi> |
| Component: | Infinispan | Assignee: | Tristan Tarrant <ttarrant> |
| Status: | CLOSED UPSTREAM | QA Contact: | Martin Gencur <mgencur> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.6.0 | CC: | 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
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. 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> This product has been discontinued or is no longer tracked in Red Hat Bugzilla. |