I am trying to export a JasperReport as a word document.

I am using jasperreports-3.5.2.jar and aspose.words.jasperreports.jar. (version

AWDocExporter exists in aspose.words.jasperreports.jar
JRAbstractExporter exists in jasperreports - 3.5 .2.jar

When I try to cast AWDocExporter to JRAbstractExporter, I get

java.lang.IncompatibleClassChangeError: Implementing class.

Any help would be appreciated.

Hi Trevor,
Thanks for your request. The problem might be caused because there are two different versions of Aspose.Words for Jasper Reports. Have you tried to clear caches?
Also, do you use only Aspose.Words for Jasper Reports in your application or you also use Aspose.Words for Java? Maybe there is a conflict between these products.
Best regards,

Thank you for your prompt response.

If I remove Aspose.Words for Java from the project (Aspose.Words.jdk16.jar) then I do not get the java.lang.IncompatibleClassChangeError exception.

So I think you are right; there is a conflict between Aspose.Words for Java and Aspose.Words for Jasper Reports. Do you know of a way to resolve this conflict so that I can have both products in my application?


Thank you for additional information. I suppose you can try wrapping one Aspose.Words JAR into your own JAR and expose only methods, which you use. Maybe this could help you to resolve the problem.
Best regards,

Thanks! Using this information I was able to solve my issue.