I have a very weird problem. I am running into a NullPointerException in the production environment. Unit Testing works fine. My code:
Document doc = new Document("sample.pdf");
ParagraphAbsorber absorber = new ParagraphAbsorber();
absorber.visit(doc); //NullPointerException occurs here
Here is the stacktrace:
at com.aspose.pdf.internal.ms.System.I331.lif(Unknown Source)
at com.aspose.pdf.MarkupSection.ll(Unknown Source)
at com.aspose.pdf.MarkupSection.lIF(Unknown Source)
at com.aspose.pdf.ParagraphAbsorber.visit(Unknown Source)
at com.aspose.pdf.ParagraphAbsorber.visit(Unknown Source)
Few observations:
- Always works the first time - meaning I don’t get a NullPointerException
- It breaks after running for a couple of times. Sometimes it dies on the second attempt, on other occasions, it dies on the third or fourth iteration.
- Does not matter which PDF input file I use. Happens with ANY PDF file. Once NullPointerException starts to occur it does not get fixed unless I restart the process
- Never happens during Unit Testing. I have tried running the code in a for loop that iterates 100 times.
My Question: Can someone in support please tell me what is the program looking for in com.aspose.pdf.internal.ms.System.I331.lif . The stacktrace is obfuscated and therefore, I do not know the exact class name.