Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-2000

Output of ProtocolStack.printProtocolSpecAsXML() cannot be used as a protocol stack without manual modifications

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Minor
    • 3.6.7
    • 3.6.4
    • None
    • Hide

      Write the output of printProtocolSpecAsXML() to a .xml file and then use it as your stack on a subsequent run. You will get an error like this for any of the protocols that are in org.jgroups.protocols.pbcast package.

      java.lang.Exception: JGRP000002: unable to load protocol NAKACK2 (either with relative - NAKACK2 - or absolute - org.jgroups.protocols.NAKACK2 - class name)
      at org.jgroups.stack.Configurator.createLayer(Configurator.java:431)
      at org.jgroups.stack.Configurator.createProtocols(Configurator.java:398)
      at org.jgroups.stack.Configurator.setupProtocolStack(Configurator.java:90)
      at org.jgroups.stack.Configurator.setupProtocolStack(Configurator.java:57)
      at org.jgroups.stack.ProtocolStack.setup(ProtocolStack.java:477)

      You will also get a lot of deprecation warnings.

      Show
      Write the output of printProtocolSpecAsXML() to a .xml file and then use it as your stack on a subsequent run. You will get an error like this for any of the protocols that are in org.jgroups.protocols.pbcast package. java.lang.Exception: JGRP000002: unable to load protocol NAKACK2 (either with relative - NAKACK2 - or absolute - org.jgroups.protocols.NAKACK2 - class name) at org.jgroups.stack.Configurator.createLayer(Configurator.java:431) at org.jgroups.stack.Configurator.createProtocols(Configurator.java:398) at org.jgroups.stack.Configurator.setupProtocolStack(Configurator.java:90) at org.jgroups.stack.Configurator.setupProtocolStack(Configurator.java:57) at org.jgroups.stack.ProtocolStack.setup(ProtocolStack.java:477) You will also get a lot of deprecation warnings.

    Description

      The output of printProtocolSpecAsXML does not contain the pbcast package prefix for NACKACK2, GMS, STATE, etc. so the load fails due to class load failure.

      Suggest either add org.jgroups.protocols.pbcast to the protocol loading search or write protocol names with full classpath when printing the spec.

      Might it also make sense to skip writing out deprecated parameters?

      Reason: I'm generating my protocol stack programmatically because some of the parameter values are determined at run time. In order to facilitate some experimentation with timeouts/retries/etc. I decided to temporarily use an xml file which I first generate by writing out the stack to an xml file which we can tweak the settings for subsequent runs. Since every member has a unique protocol stack keeping the edits to a minimum is helpful. (Maybe using property variables would be a better approach for me?)

      Attachments

        Activity

          People

            rhn-engineering-bban Bela Ban
            jtnw_jira Jim Thomas (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: