Hi Team,
I am trying to generate a document with aspose-words-19.6-jdk17.jar:19.6.jar.
I am getting null pointer exception for the long text which I entred in the field.
Error Details:
Caused by:
com.northgateis.gem.documentproduction.generator.DocumentProductionEngineException: Unable to merge data: null
at com.northgateis.gem.documentproduction.generator.DocumentGeneratorEngine$MergeStrategy.merge(DocumentGeneratorEngine.java:716) ~[classes/:53073]
at com.northgateis.gem.documentproduction.generator.DocumentGeneratorEngine$MergeStrategy.process(DocumentGeneratorEngine.java:574) ~[classes/:53073]
... 65 common frames omitted
Caused by: java.lang.NullPointerException: null
at com.aspose.words.zzW.zzZ(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzW.zzX(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzX.zzZ(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzYXS.zzYOt(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzYXS.zzYOv(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzYXS.zzY(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzYXS.zzZ(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzXN.zzjb(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzXN.zzW(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzXN.zzX(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZ6V.zzG(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZ6V.zzH(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZ6V.zzZ3h(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZ6V.zzO(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZ69.zzF(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzYVV.zzb(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zz90.zzF(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zz91.zzZOF(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZ74.zzZ3D(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.Document.updatePageLayout(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zz49.perform(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zz4A.zzHF(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zz1B.zzYj(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zz1B.zzZD4(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZIY.zzZhu(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZIY.zzZ(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.MailMerge.zzZ(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.MailMerge.execute(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
The sample text is
testing testing testing123456 testing testing testing123456
testing testing testing123456 testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
v testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
v testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
v testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
vvv testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
v testing testing testing123456
testing testing testing123456
vv testing testing testing123456
testing testing testing123456
testing testing testing123456
vv
testing testing testing123456 testing testing testing123456
testing testing testing123456 testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
v testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
v testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
v testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
vvv testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
v testing testing testing123456
testing testing testing123456
vv testing testing testing123456
testing testing testing123456
testing testing testing123456
vv
testing testing testing123456 testing testing testing123456
testing testing testing123456 testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing testing123456
testing testing
Kindly help us to replove the issue.
Thanks and Regards,
Dipali Yadav
@dipali.yadav I cannot reproduce the problem on my side using the latest 23.4 version of Aspose.Words for Java. I have used the following simple template: in.docx (12.2 KB)
and the following simple code:
String test = "testing testing testing123456 testing testing testing123456\n" +
" testing testing testing123456 testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
"v testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
"v testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
"v testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
"vvv testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
"v testing testing testing123456\n" +
" testing testing testing123456\n" +
"vv testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
"vv\n" +
" testing testing testing123456 testing testing testing123456\n" +
" testing testing testing123456 testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
"v testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
"v testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
"v testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
"vvv testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
"v testing testing testing123456\n" +
" testing testing testing123456\n" +
"vv testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
"vv\n" +
" testing testing testing123456 testing testing testing123456\n" +
" testing testing testing123456 testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing testing123456\n" +
" testing testing ";
Document doc = new Document("C:\\Temp\\in.docx");
doc.getMailMerge().execute(new String[] { "test" }, new String[] { test });
doc.save("C:\\Temp\\out.docx");
@alexey.noskov,
We are using aspose-words-19.6-jdk17.jar:19.6.jar.
Could please give a try with this version?
@dipali.yadav The same code works fine on my side with 19.6 version of Aspose.Words for Java.
aspose.7z (24.7 KB)
Hi @alexey.noskov ,
Request you to please try to decode/encrypt the error message coming from Aspose. We are facing this issue with the long text summary where the summary is almost 4000 chars.
I am attaching a sample request, response, and template for your reference. Hope this helps to replicate the issue.
template.docx (27.9 KB)
08-May-2023 09:34:46.150 | ERROR | [ http-nio-8080-exec-1] | DocumentGeneratorEngine:711 - Unable to merge data
java.lang.NullPointerException: null
at com.aspose.words.zzW.zzZ(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzW.zzW(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzW.zzZ(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzW.zzX(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzX.zzZ(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzYXS.zzYOt(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzYXS.zzYOv(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzYXS.zzY(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzYXS.zzZ(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzXN.zzjb(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzXN.zzW(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzXN.zzX(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZ6V.zzG(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZ6V.zzH(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZ6V.zzZ3h(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZ6V.zzO(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZ69.zzF(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzYVV.zzb(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zz90.zzF(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zz91.zzZOF(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZ74.zzZ3D(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.Document.updatePageLayout(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zz49.perform(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zz4A.zzHF(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zz1B.zzYj(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zz1B.zzZD4(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZIY.zzZhu(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZIY.zzZ(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.MailMerge.zzZ(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.MailMerge.execute(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.northgateis.gem.documentproduction.generator.DocumentGeneratorEngine$MergeStrategy.merge(DocumentGeneratorEngine.java:704) ~[classes/:53073]
at com.northgateis.gem.documentproduction.generator.DocumentGeneratorEngine$MergeStrategy.process(DocumentGeneratorEngine.java:574) ~[classes/:53073]
@dipali.yadav Thank you for additional information. I have tested the scenario with your template and still cannot reproduce the problem on my side. I have tested with both 24.4 and 19.6 versions and the following code:
DataTable dt = new DataTable("/VisuallyRecordEvidence");
dt.getColumns().add("./digitalMediaType");
dt.getColumns().add("./deviceOwnerLocationSummary");
dt.getColumns().add("./isKeyEvidence");
dt.getColumns().add("./stillPhotosAvailable");
dt.getColumns().add("./digitalMediaViewableFormat");
dt.getColumns().add("./keySummaryStatement");
dt.getRows().add("OTHER DIGITAL MEDIA",
" testing testing testing123456",
"true",
"false",
null,
"Testing text Testing text Testing textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing text Testing textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing text Testing textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting textTesting text Testing text Testing textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting textTesting text Testing text Testing textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting textTesting text Testing text Testing textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing text Testing textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing text Testing textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing text Testing textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting textTesting text Testing text Testing textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting textTesting text Testing text Testing textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting textTesting text Testing text Testing textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing text Testing textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing text Testing textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing text Testing textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting textTesting text Testing text Testing textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting textTesting text Testing text Testing textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting textTesting text Testing text Testing textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing text Testing textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting text\n" +
"Testing text Testing textTesting textTesting textTesting textTesting textt");
Document doc = new Document("C:\\Temp\\in.docx");
doc.getMailMerge().executeWithRegions(dt);
doc.save("C:\\Temp\\out.docx");
Hi @alexey.noskov,
Thank you so much for your valuable time and response.
Which document file you are using. Please use the same document template file which I have provided.template.docx (27.9 KB)
template.docx
Please try to decode/encrypt error message which I have provided earlier. This issue is show stopper for us.
Regards,
Dipali
@dipali.yadav Yes, I have used your template for testing, just renamed it for convenience.
Hi @alexey.noskov,
I think you should be able to replicate this using our template and sample code. I have verified it.
This has something to do with the document page layout.
Please refer bold text from the error log.
08-May-2023 09:34:46.150 | ERROR | [ http-nio-8080-exec-1] | DocumentGeneratorEngine:711 - Unable to merge data
java.lang.NullPointerException: null
at com.aspose.words.zzW.zzZ(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzW.zzW(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzW.zzZ(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzW.zzX(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzX.zzZ(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzYXS.zzYOt(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzYXS.zzYOv(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzYXS.zzY(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzYXS.zzZ(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzXN.zzjb(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzXN.zzW(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzXN.zzX(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZ6V.zzG(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZ6V.zzH(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZ6V.zzZ3h(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZ6V.zzO(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZ69.zzF(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzYVV.zzb(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zz90.zzF(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zz91.zzZOF(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZ74.zzZ3D(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
**at com.aspose.words.Document.updatePageLayout(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]**
at com.aspose.words.zz49.perform(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zz4A.zzHF(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zz1B.zzYj(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zz1B.zzZD4(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZIY.zzZhu(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.zzZIY.zzZ(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.MailMerge.zzZ(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.aspose.words.MailMerge.execute(Unknown Source) ~[aspose-words-19.6-jdk17.jar:19.6]
at com.northgateis.gem.documentproduction.generator.DocumentGeneratorEngine$MergeStrategy.merge(DocumentGeneratorEngine.java:704) ~[classes/:53073]
at com.northgateis.gem.documentproduction.generator.DocumentGeneratorEngine$MergeStrategy.process(DocumentGeneratorEngine.java:574) ~[classes/:53073]
Please try to decode/encrypt the error message which I shared and try to replicate the issue.
For me it is simply replicating with the sample request and template which I shared. I have shared the response also.
Regards,
Dipali
@dipali.yadav Unfortunately, I still cannot reproduce the problem on my side. I will ask our Java developers to take a look. We will keep you posted.
@dipali.yadav,
Unfortunately, I also cannot reproduce the problem on my side. Also note that version 19.6 is no longer supported and we will not be able to release an update for it. Please check your code with using the latest version Aspose.Words for Java 23.4. In case the error is repeated, please send error details for the latest version.
Hi @alexey.maslov, Could you please have a look around this method call? - Document.updatePageLayout.
You can decode the Null pointer exception using this error message, please.
The template which I shared was designed using tables. Is this something useful information for you?
Is it possible for you to share the document file you got generated with my sample request
Regards,
Dipali.
@dipali.yadav,
Here is the document produced by the above code using the latest version of Aspose.Words for Java.
template_out.docx (22.2 KB)
The decoding of the error message for the old version is not informative, since version 19.6 is no longer supported and there have been many changes in the library.
I have noticed updateLayout call and googled it. I got many issues with Null Pointer Exception at the same place.
something to do with Aspose updateLayout call. It will be helpful if you check this please.
Not sure if updating the Aspose version will help because you are not able to replicate it with any version.
@dipali.yadav Unfortunately, it is difficult to say what the problem is on your side without an ability to reproduce the problem on our side.
updateLayout
builds document layout, which is really complex process. So it is not possible to filter the issue using stack trace only.