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

Free Support Forum - aspose.com

Class cast exception when comparing two documents

I’m attempting to compare two Word documents, but am getting a ClassCastException when running Document.compare.

Document original = new Document(“TestFileOriginal.docx”);
Document revision = new Document(“TestFileRevised.docx”);
original.compare(revision, “Jason”, new Date());


Exception in thread “main” java.lang.ClassCastException: com.aspose.words.AbsolutePositionTab cannot be cast to com.aspose.words.Run

The two files were generated with docx4j.

I am using Aspose.Words 15.6.0

Thank you for any assistance,

Hi Jason,

Thanks for your inquiry. I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-12108. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-12108) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.