Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-4202

NPE if additional_data is not set

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • JBossAS-4.2.0.CR2
    • JBossAS-4.0.3 SP1, JBossAS-3.2.8 Final, JBossAS-3.2.8.SP1, JBossAS-4.0.4.GA, JBossAS-4.0.5.GA, JBossAS-4.2.0.CR1
    • Clustering
    • None

    Description

      If the cluster setup doesn't support the jgroups additional_data feature, the 2nd and later nodes in the cluster will crash with an NPE.

      From the forum post:

      This is the method from the org.jboss.ha.framework.server.HAPartitionImpl which is crashing :
      Code:

      protected void verifyNodeIsUnique (Vector javaGroupIpAddresses) throws Exception
      {
      byte[] localUniqueName = this.localJGAddress.getAdditionalData();
      if (localUniqueName == null)
      log.warn("No additional information has been found in the JavaGroup address: " +
      "make sure you are running with a correct version of JGroups and that the protocol " +
      " you are using supports the 'additionalData' behaviour");

      for (int i = 0; i < javaGroupIpAddresses.size(); i++)
      {
      IpAddress address = (IpAddress) javaGroupIpAddresses.elementAt;
      if (!address.equals(this.localJGAddress))

      { if (localUniqueName.equals(address.getAdditionalData())) throw new Exception ("Local node removed from cluster (" + this.localJGAddress + "): another node (" + address + ") publicizing the same name was already there"); }

      }
      }

      The "if (localUniqueName.equals(address.getAdditionalData()))" is the one causing the NPE.

      Method should return after the WARN.

      I believe the TUNNEL protocol does not properly support additional_data, but haven't 100% confirmed this. That's a separate issue, but is the likely usage that will expose this issue.

      Attachments

        Activity

          People

            bstansbe@redhat.com Brian Stansberry
            bstansbe@redhat.com Brian Stansberry
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: