org.apache.pdfbox.exceptions.COSVisitorException

java.lang.IndexOutOfBoundsException: Index: 72, Size: 0

Samebug tips1

Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range. Applications can subclass this class to indicate similar exceptions.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web5

  • java.lang.IndexOutOfBoundsException: Index: 72, Size: 0
  • via Apache's JIRA Issue Tracker by James Green, 11 months ago
    java.lang.IndexOutOfBoundsException: Index: 72, Size: 0
  • via Apache's JIRA Issue Tracker by James Green, 1 year ago
    java.lang.IndexOutOfBoundsException: Index: 72, Size: 0
  • Stack trace

    • org.apache.pdfbox.exceptions.COSVisitorException: java.lang.IndexOutOfBoundsException: Index: 72, Size: 0 at org.apache.pdfbox.pdfwriter.COSWriter.visitFromStream(COSWriter.java:1354) at org.apache.pdfbox.cos.COSStream.accept(COSStream.java:217) at org.apache.pdfbox.cos.COSObject.accept(COSObject.java:206) at org.apache.pdfbox.pdfwriter.COSWriter.doWriteObject(COSWriter.java:525) at org.apache.pdfbox.pdfwriter.COSWriter.doWriteBody(COSWriter.java:435) at org.apache.pdfbox.pdfwriter.COSWriter.visitFromDocument(COSWriter.java:1122) at org.apache.pdfbox.cos.COSDocument.accept(COSDocument.java:552) at org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1501) at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1324) at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1305) at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1292) at com.test.PdfBoxTest.testPdfBox2(PdfBoxTest.java:77) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: java.lang.IndexOutOfBoundsException: Index: 72, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at java.util.ArrayList.get(ArrayList.java:322) at org.apache.pdfbox.io.RandomAccessBuffer.seek(RandomAccessBuffer.java:84) at org.apache.pdfbox.io.RandomAccessFileInputStream.read(RandomAccessFileInputStream.java:96) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read1(BufferedInputStream.java:258) at java.io.BufferedInputStream.read(BufferedInputStream.java:317) at org.apache.pdfbox.pdfwriter.COSWriter.visitFromStream(COSWriter.java:1337) ... 34 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 11 months ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    230 more bugmates