Uploaded image for project: 'XMLBeans'
  1. XMLBeans
  2. XMLBEANS-64

ArrayIndexOutOfBoundsException during validation

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Version 2
    • Fix Version/s: Version 2 Beta 1, Version 2
    • Component/s: Validator
    • Labels:
      None
    • Environment:
      Win XPsp1
      JDK 1.5.0 b63

      Description

      This is an exception occurring during validation of an XML document. The attached repro compiles an XSD, loads an XML document through the XMLBean's Factory, and then attempts to validate the document. The result is an ArrayIndexOutOfBoundsException. The XML document was created through the Document.save(...).

      Apache Beehive has a 10 week old snapshot of xbean.jar, and on that version, the parse / validate is successful.

      A repro will be attached.

      The stack trace:

      [java] java.lang.ArrayIndexOutOfBoundsException: 65
      [java] at org.apache.xmlbeans.impl.newstore2.CharUtil$CharIterator.init(CharUtil.java:702)
      [java] at org.apache.xmlbeans.impl.newstore2.CharUtil.isWhiteSpace(CharUtil.java:132)
      [java] at org.apache.xmlbeans.impl.newstore2.Validate.textIsWhitespace(Validate.java:215)
      [java] at org.apache.xmlbeans.impl.validator.Validator.handleText(Validator.java:831)
      [java] at org.apache.xmlbeans.impl.validator.Validator.textEvent(Validator.java:802)
      [java] at org.apache.xmlbeans.impl.validator.Validator.nextEvent(Validator.java:246)
      [java] at org.apache.xmlbeans.impl.newstore2.Validate.emitEvent(Validate.java:168)
      [java] at org.apache.xmlbeans.impl.newstore2.Validate.process(Validate.java:84)
      [java] at org.apache.xmlbeans.impl.newstore2.Validate.<init>(Validate.java:39)
      [java] at org.apache.xmlbeans.impl.newstore2.Xobj.validate(Xobj.java:1673)
      [java] at org.apache.xmlbeans.impl.values.XmlObjectBase.validate(XmlObjectBase.java:343)
      [java] at XBeanCharUtilRepro.main(Unknown Source)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java
      :25)
      [java] at java.lang.reflect.Method.invoke(Method.java:585)
      [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:193)
      [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:130)
      [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:705)
      [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:177)
      [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:83)
      [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
      [java] at org.apache.tools.ant.Task.perform(Task.java:364)
      [java] at org.apache.tools.ant.Target.execute(Target.java:341)
      [java] at org.apache.tools.ant.Target.performTasks(Target.java:369)
      [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
      [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
      [java] at org.apache.tools.ant.Main.runBuild(Main.java:673)
      [java] at org.apache.tools.ant.Main.startAnt(Main.java:188)
      [java] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
      [java] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)

        Attachments

        1. xbean-charutuilrepro.zip
          6 kB
          Edward O'Neil

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ekoneil Edward O'Neil
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: