java.lang.IllegalArgumentException: Contents must be presorted

631 Views Asked by At
java.lang.IllegalArgumentException: Contents must be presorted - added value -2146647068 is less than preceding value 2147447602
    at org.netbeans.core.output2.IntList.add(IntList.java:76)
    at org.netbeans.core.output2.AbstractLines.lineUpdated(AbstractLines.java:764)
    at org.netbeans.core.output2.OutWriter.write(OutWriter.java:216)
    at org.netbeans.core.output2.OutWriter.doWrite(OutWriter.java:453)
    at org.netbeans.core.output2.OutWriter.println(OutWriter.java:488)
    at org.netbeans.core.output2.OutWriter.print(OutWriter.java:526)
    at org.netbeans.core.output2.NbIO$IOColorLinesImpl.println(NbIO.java:494)
    at org.openide.windows.IOColorLines.println(IOColorLines.java:88)
    at org.apache.tools.ant.module.run.StandardLogger.formatColoredMessageWithTime(StandardLogger.java:353)
    at org.apache.tools.ant.module.run.StandardLogger.buildFinished(StandardLogger.java:318)
[catch] at org.apache.tools.ant.module.bridge.impl.NbBuildLogger.buildFinished(NbBuildLogger.java:440)
    at org.apache.tools.ant.Project.fireBuildFinished(Project.java:2093)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:290)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:541)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)

I received this Exception when running an SAX Parser that needs to read large chunks of XML data. The data is stored into a Hashtree. After about 15 mins of running, this exception was found. What does it mean?

1

There are 1 best solutions below

2
On

It means: somewhere in the program there is an int that reached its maximum value. Integers have a maximum value of 2,147,483,647. When they reach this value, they loop back to their minimum value, -2,147,483,648. What probably happened is that there is a loop in the program that constantly increments an integer. When the program runs for long enough, the integer reaches its maximum value and loops back to its minimum value. The program doesn't expect this, so it throws an error.