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

CompatibilityProtoStreamMarshaller can't be set in server

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 9.1.0.Final, 9.0.3.Final
    • 9.0.0.Final
    • Server
    • None
    • 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.

            rh-ee-galder Galder ZamarreƱo
            rh-ee-galder Galder ZamarreƱo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: