Uploaded image for project: 'Red Hat Data Grid'
  1. Red Hat Data Grid
  2. JDG-1026

CompatibilityProtoStreamMarshaller can't be set in server

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • JDG 7.2 DR1, JDG 7.2 GA
    • JDG 7.1.0 GA
    • Server
    • None
    • DR1
    • Workaround Exists
    • Hide

      I worked around that by tweaking the module.xml to have an optional dependency to "org.infinispan.remote-query.server" module. e.g.

      <?xml version="1.0" encoding="UTF-8"?>
      
      <module xmlns="urn:jboss:module:1.3" name="org.infinispan">
         <resources>
            <resource-root path="infinispan-core.jar"/>
         </resources>
      
         <dependencies>
            <module name="javax.api"/>
            <module name="javax.transaction.api"/>
            <module name="org.jboss.logging"/>
            <module name="org.infinispan.commons" export="true"/>
            <module name="org.infinispan.query" optional="true" services="import"/>
            <!-- MOD :: START :: add remote query server dependency to be able to
             define org.infinispan.query.remote.CompatibilityProtoStreamMarshaller
             as compatibility marshaller
            -->
            <module name="org.infinispan.remote-query.server" optional="true"/>
            <!-- MOD :: END -->
            <module name="org.infinispan.lucene-directory" optional="true" export="true" services="export" />
            <module name="org.jboss.marshalling" services="import"/>
            <module name="org.jgroups"/>
            <module name="sun.jdk"/>
         </dependencies>
      </module>
      
      Show
      I worked around that by tweaking the module.xml to have an optional dependency to "org.infinispan.remote-query.server" module. e.g. <?xml version= "1.0" encoding= "UTF-8" ?> <module xmlns= "urn:jboss:module:1.3" name= "org.infinispan" > <resources> <resource-root path= "infinispan-core.jar" /> </resources> <dependencies> <module name= "javax.api" /> <module name= "javax.transaction.api" /> <module name= "org.jboss.logging" /> <module name= "org.infinispan.commons" export= " true " /> <module name= "org.infinispan.query" optional= " true " services= " import " /> <!-- MOD :: START :: add remote query server dependency to be able to define org.infinispan.query.remote.CompatibilityProtoStreamMarshaller as compatibility marshaller --> <module name= "org.infinispan.remote-query.server" optional= " true " /> <!-- MOD :: END --> <module name= "org.infinispan.lucene-directory" optional= " true " export= " true " services= "export" /> <module name= "org.jboss.marshalling" services= " import " /> <module name= "org.jgroups" /> <module name= "sun.jdk" /> </dependencies> </module>

      Out of the box, it's impossible to set compatibility marshaller to org.infinispan.query.remote.CompatibilityProtoStreamMarshaller in server because org.infinispan.main classloader can't access that class.

      As dan.berindei suggested in the mailing list, one way to avoid these kind of issues would be to allow class definitions to have slot:module:class format so that using the ModularClassResolver any class can be found.

              anistor Adrian Nistor (Inactive)
              rh-ee-galder Galder ZamarreƱo
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: