Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-3470

Infinite loop in org.jboss.ws.core.soap.NodeImpl

    XMLWordPrintable

Details

    • Hide

      call getParent() on any document that fails one of the two tested conditions in assertParent:
      if (domParent != null && soapParent == null)
      588 throw new WSException("Inconsistent node, has a DOM parent but no SOAP parent [" + this + "] " + DOMWriter.printNode(this, false));
      589 if (domParent != null && soapParent != null && domParent != soapParent.domNode)
      590 throw new WSException("Inconsistent node, SOAP parent is not identical with DOM parent [" + this + "] " + DOMWriter.printNode(this, false));

      Show
      call getParent() on any document that fails one of the two tested conditions in assertParent: if (domParent != null && soapParent == null) 588 throw new WSException("Inconsistent node, has a DOM parent but no SOAP parent [" + this + "] " + DOMWriter.printNode(this, false)); 589 if (domParent != null && soapParent != null && domParent != soapParent.domNode) 590 throw new WSException("Inconsistent node, SOAP parent is not identical with DOM parent [" + this + "] " + DOMWriter.printNode(this, false));

    Description

      When there is an issue with the DOM document uncovered in assertParent(), the construction of the exception calls DOMWriter.printNode(). This method ends up recursively calling back to the NodeImpl.getParent() which calls NodeImpl.assertParent(), which fails and starts the whole cycle over again until the thread blows up with a stack overflow. Sample stack trace of the infinite recursion:
      at org.jboss.ws.core.soap.NodeImpl.getParentNode(NodeImpl.java:276)
      at org.jboss.wsf.common.DOMWriter.getNamespaceURI(DOMWriter.java:518)
      at org.jboss.wsf.common.DOMWriter.printInternal(DOMWriter.java:299)
      at org.jboss.wsf.common.DOMWriter.print(DOMWriter.java:233)
      at org.jboss.wsf.common.DOMWriter.printNode(DOMWriter.java:152)
      at org.jboss.ws.core.soap.NodeImpl.assertSOAPParent(NodeImpl.java:588)
      at org.jboss.ws.core.soap.NodeImpl.getParentNode(NodeImpl.java:276)
      at org.jboss.wsf.common.DOMWriter.getNamespaceURI(DOMWriter.java:518)
      at org.jboss.wsf.common.DOMWriter.printInternal(DOMWriter.java:299)
      at org.jboss.wsf.common.DOMWriter.print(DOMWriter.java:233)
      at org.jboss.wsf.common.DOMWriter.printNode(DOMWriter.java:152)
      at org.jboss.ws.core.soap.NodeImpl.assertSOAPParent(NodeImpl.java:588)
      at org.jboss.ws.core.soap.NodeImpl.getParentNode(NodeImpl.java:276)
      at org.jboss.wsf.common.DOMWriter.getNamespaceURI(DOMWriter.java:518)
      at org.jboss.wsf.common.DOMWriter.printInternal(DOMWriter.java:299)
      at org.jboss.wsf.common.DOMWriter.print(DOMWriter.java:233)
      at org.jboss.wsf.common.DOMWriter.printNode(DOMWriter.java:152)
      at org.jboss.ws.core.soap.NodeImpl.assertSOAPParent(NodeImpl.java:588)
      at org.jboss.ws.core.soap.NodeImpl.getParentNode(NodeImpl.java:276)
      at org.jboss.wsf.common.DOMWriter.getNamespaceURI(DOMWriter.java:518)
      at org.jboss.wsf.common.DOMWriter.printInternal(DOMWriter.java:299)
      at org.jboss.wsf.common.DOMWriter.print(DOMWriter.java:233)
      at org.jboss.wsf.common.DOMWriter.printNode(DOMWriter.java:152)
      at org.jboss.ws.core.soap.NodeImpl.assertSOAPParent(NodeImpl.java:588)

      This may affect other versions as well but was uncovered using 3.4.0.

      Attachments

        Activity

          People

            ropalka Richard Opalka
            dwinslow_jira David Winslow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: