Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6473186

OUTOFBOUNDSEXCEPTION WHEN OPENING MAP THAT HAS A LOT OF JOINS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.4.2_09
    • xml

      There is a limit that seems to come from the elementStack of ParentNode objects in org.apache.crimson.tree.XmlDocumentBuilder. That is where the following comment is located:

      /**
           * Receive notification of the beginning of a document.
           */
          public void startDocument () throws SAXException
          {
      document = createDocument ();

      if (locator != null)
      document.setSystemId (locator.getSystemId ());

      //
              // XXX don't want fixed size limits! Fix someday. For
      // now, wide trees predominate, not deep ones. This is
      // allowing a _very_ deep tree ... we typically observe
      // depths on the order of a dozen.
      //
              elementStack = new ParentNode [200];
              topOfStack = 0;
              elementStack [topOfStack] = document;

      inDTD = false;
          }

      Upon further debugging, it appears to be in
      org.apache.crimson.tree.XmlDocumentBuilder.startElement() at line 495 when we have to add a new node and there are already 200 nodes in the array elementStack which was created to have on 200 nodes in it.

      elementStack[topOfStack++].appendChild(e);
      elementStack[topOfStack] = e;

      topOfStack is 200 comming in and the array can only hold 200.

      This appears to be a parser limit that we cannot change, and does not appear to be changed in Java JDK 1.4.2_09 or _10.

      We possibly could change the structure of our XML to not hit this limit.

      Stack Trace:

      ava.lang.ArrayIndexOutOfBoundsException: 200
      at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
      at org.apache.crimson.parser.Parser2.parse(Unknown Source)
      at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
      at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(Unknown Source)
      at com.sas.iquery.metadata.impl.IQModelImplUtilities.newDocument(Unknown
      Source)

      200

      com.sas.iquery.metadata.MetadataException: 200 [ org.xml.sax.SAXParseException:
      200 ]
      at com.sas.iquery.metadata.impl.IQModelImplUtilities.newDocument(Unknown
      Source)
      at com.sas.iquery.metadata.business.impl.AbstractModel.getMapDocument(Unknown
      Source)
      at com.sas.iquery.metadata.business.impl.AbstractModel.fetchMap(Unknown Source)
      at
      com.sas.iquery.metadata.business.impl.InformationMapImpl.readInNewMap(Unknown
      Source)
      at com.sas.iquery.metadata.business.InformationMapFactory.getMap(Unknown
      Source)
      at
      com.sas.iquery.metadata.business.InformationMapFactory.newInformationMap(Unknown
      Source)
      at
      com.sas.apps.mapStudio.models.RepositoryGateway.getInformationMap(RepositoryGate
      way.java:654)
      at
      com.sas.apps.mapStudio.visuals.repository.RepositoryTreeView.onAction(Repository
      TreeView.java:470)
      at
      com.sas.apps.mapStudio.visuals.repository.RepositoryTreeView$MouseHandler.mouseR
      eleased(RepositoryTreeView.java:1784)
      at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
      at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
      at java.awt.Component.processMouseEvent(Unknown Source)
      at java.awt.Component.processEvent(Unknown Source)
      at java.awt.Container.processEvent(Unknown Source)
      at java.awt.Component.dispatchEventImpl(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
      at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
      at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Window.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.EventQueue.dispatchEvent(Unknown Source)
      at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.run(Unknown Source)

            Unassigned Unassigned
            elarsen Erik Larsen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: