Free Support Forum -

PDF comparison without null pointer exception in Java


I just downloaded your demo Java Comparison project and set my trial lisence. I’m getting a null pointer in this line:


Error is:

Exception in thread “main” java.lang.NullPointerException
at com.groupdocs.comparison.examples.PdfDocumentsComparision.ComparePdfFromFileWithoutSettings(
at com.groupdocs.comparison.examples.MainClass.main(

Any ideas?


Can you please share the problematic files (source and target) and sample code with us? Also share the API version that you integrated.

Version 19.3
Used source and target PDF from the demo project. source.pdf (80.3 KB)
target.pdf (80.4 KB)
Thanks for your time


Please share sample code as well.


I really just took the supplied example end deleted the unneeded methods.


We couldn’t reproduce this issue at our end. Please find the resultant file attached - (95.3 KB)
However, in order to further investigate this issue, we need following information:

  • Your complete console application/project
  • Operating system and its version
  • IDE that you are using

Thank you for taking your time! (905.4 KB)
macOS Mojave 10.14.4 (18E226)
IntelliJ 2018.3.5
JDK 10

Any suggestions what I should try?

I’ve debugged the code and found that the result is null. All files are beeing found and are valid.


Do you face this issue just in case of PDF comparison? Can you please check this with some other file format (Word)? Please share a screencast of this scenario as well.
We’d appreciate your cooperation in this regard.

I’m getting this error while running a comparison ond a word document:

Caused by: class com.groupdocs.comparison.internal.c.a.s.exceptions.ArgumentException: Culture Name: en-CH is not a supported culture

I’m happy to upload a short video while running the code. You can expect it here in roughly three hours.


1 Like

Just ran your docker image and am encountering the same problem.

Logs: (3.4 KB)


Thanks for sharing the details. We’ll appreciate if you cover both scenarios in the screencast.

Sorry for letting you wait had a lot of things to do.

You can find the video here:

Please tell me if you need any further information from my side I’m happy to help!

1 Like


Thanks for sharing the video.
This seems to be a environment based issue. We are further investigating it at our end. Your investigation ticket ID is COMPARISONJAVA-586.
As we have any futher update on this, we’ll surely notify you.


Even i am getting same Null pointer Exception as above while comparing 2 PDF files. My Environment details are as below.

OS : Windows 10 64 bit
JDK : jdk1.8.0_112
IDE : Eclipse neon (4.6.0)


Your query is addressed here.


Can you please confirm if you get Null pointer exception using attached files?
testsource.pdf (2.1 KB)
testtarget.pdf (2.4 KB)

The result which gets returned is still null.


This could be because of missing fonts. Can you please confirm if Times New Roman is installed in your environment? If no, then install the font and do comparison again.

Times New Roman is installed on my environment.


We are further investigating this.