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

Bug 1097197

Summary: Unable to store custom objects via HotRod in OSGi
Product: [JBoss] JBoss Data Grid 6 Reporter: Martin Gencur <mgencur>
Component: InfinispanAssignee: Tristan Tarrant <ttarrant>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Gencur <mgencur>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: gsheldon, isavin, jdg-bugs, mhusnain
Target Milestone: ER7   
Target Release: 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
A Hot Rod client running in OSGi can not store or retrieve user-defined objects. This is because custom classes are packaged in the client's bundle and the Hot Rod client cannot see these classes. A workaround for this issue is to place the custom classes in a separate OSGi bundle and the use the <classname>Fragment-Host: org.infinispan.commons</classname> OSGi header. This allows the Hot Rod client to see the user-defined classes.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-26 14:06:08 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:
Bug Depends On:    
Bug Blocks: 1104639    

Description Martin Gencur 2014-05-13 11:17:03 UTC
This is caused by the fact that the core JDG library can't see custom classes bundled in the client's bundle. 

There's a workaround for this: Place the custom classes for keys/values in a separate OSGi bundle and use Fragment-Host header equal to infinispan-commons bundle.

This has already been fixed upstream and should be in the final product version.

Comment 2 Ion Savin 2014-06-16 15:09:33 UTC
Martin, which is the fix in upstream?

Another option would be to use the same approach as in library mode: dynamically import * on hotrod-client and require the client bundles to export the objects they want to store.

Just exporting from the client bundle might be sufficient if the loading is done in commons which already imports *.

Comment 3 Martin Gencur 2014-06-24 11:10:30 UTC
I think the correct fix was adding DynamicImport-Package directive in core. I already verified this issue in ER7. Closing.