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

Bug 1217480

Summary: Camel-jdg has a dependency on infinispan-core when only remote cache is in use
Product: [JBoss] JBoss Data Grid 6 Reporter: Martin Gencur <mgencur>
Component: Camel-JBossDataGridAssignee: Tristan Tarrant <ttarrant>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Gencur <mgencur>
Severity: high Docs Contact:
Priority: high    
Version: 6.5.0CC: dmehra, isavin, jdg-bugs, pzapataf, ttarrant
Target Milestone: ER4   
Target Release: 6.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
The camel-jbossdatagrid component requires embedded cache dependencies when a remote cache is used. The required dependency is infinispan-embedded.jar as well as the expected infinispan-remote.jar. There's the same problem when using only an embedded cache. The infinispan-remote.jar dependency is required in this case together with infinispan-embedded.jar. There's currently no workaround for this issue.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-23 12:24:29 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 Martin Gencur 2015-04-30 13:06:26 UTC
The logic of camel-jbossdatagrid component requires a dependency on infinispan-embedded/infinispan-core in all cases, even if just a remote cache is used. 

There should be separate sets of dependencies for both use cases - remote cache and embedded cache.

Comment 4 Martin Gencur 2015-05-12 10:39:49 UTC
I've checked the current solution and the separation of dependencies is not complete yet. I'm getting the following exception when using an embedded cache:
java.lang.NoClassDefFoundError: org/infinispan/client/hotrod/event/ClientCacheEntryRemovedEvent
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2451)
	at java.lang.Class.privateGetPublicMethods(Class.java:2571)
	at java.lang.Class.getMethods(Class.java:1429)
	at org.infinispan.notifications.AbstractListenerImpl.validateAndAddListenerInvocation(AbstractListenerImpl.java:179)
	at org.infinispan.notifications.cachelistener.CacheNotifierImpl.addListener(CacheNotifierImpl.java:662)
	at org.infinispan.notifications.cachelistener.CacheNotifierImpl.addListener(CacheNotifierImpl.java:624)
	at org.infinispan.CacheImpl.addListener(CacheImpl.java:676)
	at org.apache.camel.component.infinispan.InfinispanConsumerEmbeddedHandler.start(InfinispanConsumerEmbeddedHandler.java:41)
	at org.apache.camel.component.infinispan.InfinispanConsumer.doStart(InfinispanConsumer.java:82)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)

When I look at the code, there are still places where both infinispan-remote and infinispan-embedded are needed. E.g. InfinispanAsyncClusteredEventListener where both @Listener and @ClientListener are used on the same listener class.