java.lang.ClassCastException: com.aspose.words.zzZ0W cannot be cast to com.aspose.words.zzZ1W

In the attachment there are two Word files which I try to merge.

The prepared demo application is also in the zip file.

With other documents this code runs correct, also if I remove certain code parts (marked by “###”) the application works.

But in this constellation I get the following exception:
java.lang.ClassCastException: com.aspose.words.zzZ0W cannot be cast to com.aspose.words.zzZ1W
at com.aspose.words.zzZ0J.zzZ(Unknown Source)
at com.aspose.words.zzZ0J.commit(Unknown Source)
at com.aspose.words.zz9V.commit(Unknown Source)
at com.aspose.words.zzZMV.zzZFv(Unknown Source)
at com.aspose.words.zzZMV.zzZFs(Unknown Source)
at com.aspose.words.zzZMV.zzZFx(Unknown Source)
at com.aspose.words.zzZMV.zzT(Unknown Source)
at com.aspose.words.zzZN2.zzS(Unknown Source)
at com.aspose.words.zzZN1.zzQ(Unknown Source)
at com.aspose.words.zzZN1.zzX(Unknown Source)
at com.aspose.words.zzWM.zzZ(Unknown Source)
at com.aspose.words.zzZ2B.zzZeD(Unknown Source)
at com.aspose.words.zzZ2B.zzZ(Unknown Source)
at com.aspose.words.zzYB.zzV(Unknown Source)
at com.aspose.words.zzZ7W.zzJ(Unknown Source)
at com.aspose.words.zzWM.zzZ(Unknown Source)
at com.aspose.words.zzZ2B.zzZeD(Unknown Source)
at com.aspose.words.zzZ2B.zzZ(Unknown Source)
at com.aspose.words.zzZAN.zzX(Unknown Source)
at com.aspose.words.zzZAN.zzy(Unknown Source)
at com.aspose.words.zzZ0K.zzSe(Unknown Source)
at com.aspose.words.zzZXK.zzX(Unknown Source)
at com.aspose.words.zzZB5.zzS(Unknown Source)
at com.aspose.words.zzZAN.zzy(Unknown Source)
at com.aspose.words.zzZ0K.zzSe(Unknown Source)
at com.aspose.words.zz9V.zzXH(Unknown Source)
at com.aspose.words.zz9W.zz3B(Unknown Source)
at com.aspose.words.zzZO3.zzZ(Unknown Source)
at com.aspose.words.Document.updatePageLayout(Unknown Source)
at aspose.sandbox.Application.main(Application.java:54)



Tested with Aspose Words 14.10.0 and 15.02.0

Hi Peter,

Thanks for your inquiry. I have tested the scenario using latest version of Aspose.Words for Java 15.2.0 and have not found the shared issue. Please make sure that you are using the latest version of Aspose.Words for Java 15.2.0. I have attached the output document with this post for your kind reference.

Sorry forgot to attach the hyphenation files, the hyphenation files need to be loaded otherwise the exception does not occur. yes using Aspose Words 15.02.0

Hi Peter,

Thanks for your inquiry. I have tested the scenario using shared documents hyphenation files and have not found the shared issue. See the attached image for test result at my end. Please make sure that you are using the same documents and using latest version of Aspose.Words v15.2.0.

OK, I attached again the application and documents just to make sure we work with the same data.

Also attached a print screen showing the exception.

I made some small changes, to log if hyphenation is loaded.

Yes I’m using Aspose 15.02.0, how did you print the version?

And here the stacktrace, I think the trace in the original post was from Aspose 14.10.0:
java.lang.ClassCastException: com.aspose.words.zzZ2A cannot be cast to com.aspose.words.zzZ3B
at com.aspose.words.zzZ1V.zzZ(Unknown Source)
at com.aspose.words.zzZ1V.commit(Unknown Source)
at com.aspose.words.zz9T.commit(Unknown Source)
at com.aspose.words.zzZOV.zzZGV(Unknown Source)
at com.aspose.words.zzZOV.zzZGS(Unknown Source)
at com.aspose.words.zzZOV.zzZGX(Unknown Source)
at com.aspose.words.zzZOV.zzT(Unknown Source)
at com.aspose.words.zzZP2.zzS(Unknown Source)
at com.aspose.words.zzZP1.zzQ(Unknown Source)
at com.aspose.words.zzZP1.zzX(Unknown Source)
at com.aspose.words.zzWG.zzZ(Unknown Source)
at com.aspose.words.zzZ3S.zzZeW(Unknown Source)
at com.aspose.words.zzZ3S.zzZ(Unknown Source)
at com.aspose.words.zzYB.zzV(Unknown Source)
at com.aspose.words.zzZ9F.zzJ(Unknown Source)
at com.aspose.words.zzWG.zzZ(Unknown Source)
at com.aspose.words.zzZ3S.zzZeW(Unknown Source)
at com.aspose.words.zzZ3S.zzZ(Unknown Source)
at com.aspose.words.zzZC9.zzX(Unknown Source)
at com.aspose.words.zzZC9.zzx(Unknown Source)
at com.aspose.words.zzZ1W.zzSd(Unknown Source)
at com.aspose.words.zzZZX.zzX(Unknown Source)
at com.aspose.words.zzZCR.zzZsg(Unknown Source)
at com.aspose.words.zzZCR.zzS(Unknown Source)
at com.aspose.words.zzZC9.zzx(Unknown Source)
at com.aspose.words.zzZ1W.zzSd(Unknown Source)
at com.aspose.words.zz9T.zzXR(Unknown Source)
at com.aspose.words.zz9U.zz3W(Unknown Source)
at com.aspose.words.zzZQ3.zzZ(Unknown Source)
at com.aspose.words.Document.updatePageLayout(Unknown Source)
at aspose.sandbox.Application.main(Application.java:59)

Hi Peter,

Thanks for sharing the detail. 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-11682. 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.

For the record, just tested with aspose words 15.3.0, the exception is still thrown.

Hi Peter,

Yes, this issue is in Aspose.Words v15.3.0. We will update you via this forum thread once this issue is resolved.

Just got reported another Document which causes the same exception to be thrown. Maybe it helps to resolve the issue.

Hi Peter,

Thanks for sharing the document. We will update you via this forum thread once this issue is resolved. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.

I just tested with aspose words 15.05.0 and the issue still remains.

Our customer keeps on complaining and this puts us in a bad position since we can not fix it.
It is a ClassCastException, this should be quite easy to fix.

This issue now remains in 3 new releases, I’m expecting it fixed in the next release.

Hi Peter,

Thanks for your inquiry. Currently, our product team is analyzing
your issue. I am afraid, we can’t provide you any reliable estimate at
the moment. Once your issue is analyzed, we will then be able to
provide you an estimate.

Thanks for your patience and understanding.

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


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