Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-4450

RemoteStore uses wrong classloader with rawValues

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Hide

      Package JDG library mode in its own classloader (e.g. a module in EAP 6).
      Configure a RemoteStore to connect to a remote JDG server, with rawValues=true.
      Store data in the cache with a custom class visible to the application, but not to Infinispan's classloader.
      Clear the local cache (ex: restart the library mode instance).
      Retrieve the data (which will retrieve it from the RemoteStore).

      Expected: it works correctly.
      Actual: ClassNotFoundException

      Show
      Package JDG library mode in its own classloader (e.g. a module in EAP 6). Configure a RemoteStore to connect to a remote JDG server, with rawValues=true. Store data in the cache with a custom class visible to the application, but not to Infinispan's classloader. Clear the local cache (ex: restart the library mode instance). Retrieve the data (which will retrieve it from the RemoteStore). Expected: it works correctly. Actual: ClassNotFoundException
    • Workaround Exists
    • Hide

      Set a custom marshaller that uses the correct classloader.

      Show
      Set a custom marshaller that uses the correct classloader.

      RemoteStore uses the wrong classloader (Infinispan's classloader instead of the caller's classloader) during deserialization when rawValues=true is set.

      It uses a GenericJBossMarshaller, which is hard-coded to only look in Infinispan's classloader).

              ttarrant@redhat.com Tristan Tarrant
              rhn-support-dereed Dennis Reed
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: