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)
运行需要读取大量XML数据的SAX Parser时,我收到此异常。数据存储在Hashtree中。运行约15分钟后,发现了这个异常。这是什么意思?
答案 0 :(得分:2)
这意味着:在程序的某个地方有一个int达到了它的最大值。整数的最大值为2,147,483,647。当它们达到此值时,它们会回到最小值-2,147,483,648。可能发生的是程序中有一个循环不断递增一个整数。当程序运行足够长时间时,整数达到其最大值并循环回到其最小值。该程序并不期望这样,所以它会引发错误。