We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

NullpointerException while PDF-A validation

Hi,

i´ve got some problems validating pdf-a compliance.

Im using aspose.pdf 10.3.0 for java

Here is the code:
/* LOAD AsposeTotal Lic */
com.aspose.pdf.Document pdf = new com.aspose.pdf.Document(source.getAbsolutePath());
pdf.validate(logFilePath, com.aspose.pdf.PdfFormat.PDF_A_1B);

On production and I get this error:
java.lang.NullPointerException
at com.aspose.pdf.internal.p361.z2.m1(Unknown Source)
at com.aspose.pdf.internal.p575.z11.m4(Unknown Source)
at com.aspose.pdf.internal.p575.z11.m7(Unknown Source)
at com.aspose.pdf.internal.p575.z11.m3(Unknown Source)
at com.aspose.pdf.internal.p575.z8.m1(Unknown Source)
at com.aspose.pdf.internal.p576.z12.m4(Unknown Source)
at com.aspose.pdf.internal.p576.z7.(Unknown Source)
at com.aspose.pdf.internal.p576.z9.(Unknown Source)
at com.aspose.pdf.internal.p576.z12.(Unknown Source)
at com.aspose.pdf.internal.p575.z8.m1(Unknown Source)
at com.aspose.pdf.internal.p578.z27.m28(Unknown Source)
at com.aspose.pdf.internal.p581.z6.m1(Unknown Source)
at com.aspose.pdf.internal.p581.z9.m4(Unknown Source)
at com.aspose.pdf.internal.p581.z9.(Unknown Source)
at com.aspose.pdf.internal.p581.z6.m1(Unknown Source)
at com.aspose.pdf.internal.p581.z11.m1(Unknown Source)
at com.aspose.pdf.internal.p581.z11.m3(Unknown Source)
at com.aspose.pdf.internal.p581.z11.m7(Unknown Source)
at com.aspose.pdf.internal.p581.z11.m7(Unknown Source)
at com.aspose.pdf.internal.p581.z13.m1(Unknown Source)
at com.aspose.pdf.internal.p581.z13.m1(Unknown Source)
at com.aspose.pdf.internal.p581.z13.m6(Unknown Source)
at com.aspose.pdf.internal.p581.z13.(Unknown Source)
at com.aspose.pdf.internal.p581.z13.(Unknown Source)
at com.aspose.pdf.internal.p581.z13.(Unknown Source)
at com.aspose.pdf.internal.p618.z2.m1(Unknown Source)
at com.aspose.pdf.internal.p618.z2.m11(Unknown Source)
at com.aspose.pdf.internal.p618.z2.m1(Unknown Source)
at com.aspose.pdf.ADocument.convert(Unknown Source)
at com.aspose.pdf.Document.convert(Unknown Source)
at com.aspose.pdf.ADocument.validate(Unknown Source)
at com.aspose.pdf.Document.validate(Unknown Source)
at de.dmi.document.toolbox.Validator.PDFAValidator.validate(PDFAValidator.java:36)
java: jdk1.7.0_71 
the mainproblem is, that i cant reproduce the error. sometimes it happens, sometimes not. ive attached a document, where the last error has been logged at.
it would be nice if you can take a look at this. 

thank you and kind reguards 
markus 




Hi Markus,


Thanks for contacting support.

I have tested the scenario using latest release of Aspose.Pdf for Java 10.6.1 in Eclipse Juno project with JDk 1.7 running over Windows 7 (x64) and I am unable to notice any issue. I have tested the scenario for numerous times but no problem is occurring. Can you please try using latest release and in case the problem still persists, please share some details regarding your working environment.

PS, as per my observations, the file is properly being validated.

[Java]

com.aspose.pdf.Document pdf = new
com.aspose.pdf.Document(“c:/pdftest/asdf.pdf”);<o:p></o:p>

System.out.println(pdf.validate(“c:/pdftest/asdf_validationLog.txt”,
com.aspose.pdf.PdfFormat.
PDF_A_1B));