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

RemoteStore uses wrong classloader with rawValues

    XMLWordPrintable

Details

    • 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.

    Description

      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).

      Attachments

        Activity

          Public project attachment banner

            context keys: [headless, issue, helper, isAsynchronousRequest, project, action, user]
            current Project key: ISPN

            People

              ttarrant@redhat.com Tristan Tarrant
              rhn-support-dereed Dennis Reed
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: