Document.updateFields throws java.lang.ClassCastException | DocVaribale

Hi we are using Aspose for java to generate Word document but get this error if a DocVaribale value is “)))”

java.lang.ClassCastException: com.aspose.words.zzZ93 incompatible with com.aspose.words.zzZT1
	at com.aspose.words.zz50.zzZ(Unknown Source) ~[aspose-words-15.5.0-jdk16.jar:15.5.0.0]

The exception is triggered inside Document doc.updateFields() . Any help will be appreciated.

@Ligong

We suggest you please use the latest version of Aspose.Words for Java 21.5. Hope this helps you.

If you still face problem, please attach the following resources here for testing:

  • Your input Word document.
  • Please create a simple Java application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

It works now in our standalone java program. Thank you so much. I wonder if you can provide a 30 days free version without any function restrictions so that we can fully test our enterprise application before our management can approve the purchase. We need to make sure its backward compatibility. Your current free trial version has too many limitations. Our current version in production is “aspose-words-15.5.0-jdk16.jar”. Thanks.

@Ligong

Please get the 30 days temporary license from here: