Error Processing Report Templates After Editing with Microsoft Word 365

Hello,

Some time ago, we created several reports using the Jmix Reports add-on. Recently, we encountered an issue when editing the report templates using Microsoft® Word for Microsoft 365 MSO (Version 2503 Build 16.0.18623.20266) 64-bit.

After modifying the templates with this version of Word, we receive the following error during report processing:

Caused by: org.docx4j.openpackaging.exceptions.Docx4JException: Error processing zip file (is it a zip file?)
Caused by: java.lang.ArithmeticException: integer overflow

We have tried manually updating the docx4j libraries, but the error still persists.

Due to internal policies, we are not allowed to use earlier versions of Microsoft Office. Could you please advise on how to resolve this issue?

Thank you in advance for your support.

Best regards

Hello,

Please provide your Jmix version and the full stacktrace of exception.

Regards,
Ivan

Jmix 2.5.1

6648 — [undTask-0-admin] i.j.r.libintegration.JmixReporting : Started report [PRUEBAAA - EELL - WORD Análisis Detallado ] with parameters [
ejercicioEELL:2025.0
trimestre:1.0]
2025-06-19T13:16:56.112+02:00 WARN 16648 — [undTask-0-admin] org.docx4j.utils.ResourceUtils : Couldn’t get resource: docx4j.properties
2025-06-19T13:16:56.113+02:00 WARN 16648 — [undTask-0-admin] org.docx4j.Docx4jProperties : Couldn’t find/read docx4j.properties; docx4j.properties not found via classloader.
2025-06-19T13:16:56.139+02:00 INFO 16648 — [undTask-0-admin] i.j.r.libintegration.JmixReporting : An error occurred while running report [PRUEBAAA - EELL - WORD Análisis Detallado ] with parameters [
ejercicioEELL:2025.0
trimestre:1.0].
2025-06-19T13:16:56.140+02:00 INFO 16648 — [undTask-0-admin] i.j.r.libintegration.JmixReporting : Trace:

io.jmix.reports.yarg.exception.ReportFormattingException: An error occurred while reading docx template. File name [modificado.docx]. Template name [modificado.docx]
at io.jmix.reports.yarg.formatters.impl.AbstractFormatter.wrapWithReportingException(AbstractFormatter.java:304) ~[jmix-reports-2.5.1.jar:na]
at io.jmix.reports.yarg.formatters.impl.DocxFormatter.loadDocument(DocxFormatter.java:137) ~[jmix-reports-2.5.1.jar:na]
at io.jmix.reports.yarg.formatters.impl.DocxFormatter.renderDocument(DocxFormatter.java:82) ~[jmix-reports-2.5.1.jar:na]
at io.jmix.reports.yarg.reporting.Reporting.generateReport(Reporting.java:132) ~[jmix-reports-2.5.1.jar:na]
at io.jmix.reports.yarg.reporting.Reporting.runReport(Reporting.java:91) ~[jmix-reports-2.5.1.jar:na]
at io.jmix.reports.yarg.reporting.Reporting.runReport(Reporting.java:114) ~[jmix-reports-2.5.1.jar:na]
at io.jmix.reports.runner.impl.ReportRunnerImpl.createReportDocumentInternal(ReportRunnerImpl.java:134) ~[jmix-reports-2.5.1.jar:na]
at io.jmix.reports.runner.impl.ReportRunnerImpl.run(ReportRunnerImpl.java:82) ~[jmix-reports-2.5.1.jar:na]
at io.jmix.reportsflowui.runner.impl.UiReportRunnerImpl$2.run(UiReportRunnerImpl.java:200) ~[jmix-reports-flowui-2.5.1.jar:na]
at io.jmix.reportsflowui.runner.impl.UiReportRunnerImpl$2.run(UiReportRunnerImpl.java:194) ~[jmix-reports-flowui-2.5.1.jar:na]
at io.jmix.flowui.backgroundtask.LocalizedTaskWrapper.run(LocalizedTaskWrapper.java:94) ~[jmix-flowui-2.5.1.jar:na]
at io.jmix.flowui.backgroundtask.impl.BackgroundWorkerImpl$TaskExecutorImpl.call(BackgroundWorkerImpl.java:220) ~[jmix-flowui-2.5.1.jar:na]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
at io.jmix.flowui.backgroundtask.impl.BackgroundWorkerImpl$TaskExecutorImpl.lambda$startExecution$0(BackgroundWorkerImpl.java:396) ~[jmix-flowui-2.5.1.jar:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:840) ~[na:na]
Caused by: org.docx4j.openpackaging.exceptions.Docx4JException: Error processing zip file (is it a zip file?)
at org.docx4j.openpackaging.io3.stores.ZipPartStore.(ZipPartStore.java:155) ~[docx4j-core-11.5.3.jar:na]
at org.docx4j.openpackaging.packages.OpcPackage.load(OpcPackage.java:570) ~[docx4j-core-11.5.3.jar:na]
at org.docx4j.openpackaging.packages.OpcPackage.load(OpcPackage.java:421) ~[docx4j-core-11.5.3.jar:na]
at org.docx4j.openpackaging.packages.OpcPackage.load(OpcPackage.java:387) ~[docx4j-core-11.5.3.jar:na]
at org.docx4j.openpackaging.packages.OpcPackage.load(OpcPackage.java:352) ~[docx4j-core-11.5.3.jar:na]
at org.docx4j.openpackaging.packages.WordprocessingMLPackage.load(WordprocessingMLPackage.java:182) ~[docx4j-core-11.5.3.jar:na]
at io.jmix.reports.yarg.formatters.impl.DocxFormatter.loadDocument(DocxFormatter.java:134) ~[jmix-reports-2.5.1.jar:na]
… 15 common frames omitted
Caused by: java.lang.ArithmeticException: integer overflow
at java.base/java.lang.Math.toIntExact(Math.java:1135) ~[na:na]
at org.docx4j.openpackaging.io3.stores.ZipPartStore.getBytesFromInputStream(ZipPartStore.java:181) ~[docx4j-core-11.5.3.jar:na]
at org.docx4j.openpackaging.io3.stores.ZipPartStore.(ZipPartStore.java:146) ~[docx4j-core-11.5.3.jar:na]
… 21 common frames omitted

2025-06-19T13:16:56.157+02:00 ERROR 16648 — [undTask-0-admin] i.j.f.backgroundtask.BackgroundWorker : Exception occurred in background task

io.jmix.reports.exception.ReportingException: An error occurred while reading docx template. File name [modificado.docx]. Template name [modificado.docx] Report name [PRUEBAAA - EELL - WORD Análisis Detallado ]
Error processing zip file (is it a zip file?)
integer overflow
at io.jmix.reports.runner.impl.ReportRunnerImpl.createReportDocumentInternal(ReportRunnerImpl.java:161) ~[jmix-reports-2.5.1.jar:na]
at io.jmix.reports.runner.impl.ReportRunnerImpl.run(ReportRunnerImpl.java:82) ~[jmix-reports-2.5.1.jar:na]
at io.jmix.reportsflowui.runner.impl.UiReportRunnerImpl$2.run(UiReportRunnerImpl.java:200) ~[jmix-reports-flowui-2.5.1.jar:na]
at io.jmix.reportsflowui.runner.impl.UiReportRunnerImpl$2.run(UiReportRunnerImpl.java:194) ~[jmix-reports-flowui-2.5.1.jar:na]
at io.jmix.flowui.backgroundtask.LocalizedTaskWrapper.run(LocalizedTaskWrapper.java:94) ~[jmix-flowui-2.5.1.jar:na]
at io.jmix.flowui.backgroundtask.impl.BackgroundWorkerImpl$TaskExecutorImpl.call(BackgroundWorkerImpl.java:220) ~[jmix-flowui-2.5.1.jar:na]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
at io.jmix.flowui.backgroundtask.impl.BackgroundWorkerImpl$TaskExecutorImpl.lambda$startExecution$0(BackgroundWorkerImpl.java:396) ~[jmix-flowui-2.5.1.jar:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:840) ~[na:na]

Caused by: org.docx4j.openpackaging.exceptions.Docx4JException: Error processing zip file (is it a zip file?)

Caused by: java.lang.ArithmeticException: integer overflow

2025-06-19T14:21:34.935+02:00 WARN 16648 — [alina-utility-1] i.j.f.f.s.c.b.AbstractGridSettingsBinder : DataGrid contains one or more columns without key specified, settings for them will not be stored
2025-06-19T14:21:34.939+02:00 WARN 16648 — [alina-utility-1] i.j.f.f.s.c.b.AbstractGridSettingsBinder : DataGrid contains one or more columns without key specified, settings for them will not be stored

2025-06-19T13:16:56.112+02:00 WARN 16648 — [undTask-0-admin] org.docx4j.utils.ResourceUtils : Couldn’t get resource: docx4j.properties
2025-06-19T13:16:56.113+02:00 WARN 16648 — [undTask-0-admin] org.docx4j.Docx4jProperties : Couldn’t find/read docx4j.properties; docx4j.properties not found via classloader.
2025-06-19T13:16:56.139+02:00 INFO 16648 — [undTask-0-admin] i.j.r.libintegration.JmixReporting : An error occurred while running report [PRUEBAAA - EELL - WORD Análisis Detallado ] with parameters [
ejercicioEELL:2025.0
trimestre:1.0].
2025-06-19T13:16:56.140+02:00 INFO 16648 — [undTask-0-admin] i.j.r.libintegration.JmixReporting : Trace:

io.jmix.reports.yarg.exception.ReportFormattingException: An error occurred while reading docx template. File name [modificado.docx]. Template name [modificado.docx]
at io.jmix.reports.yarg.formatters.impl.AbstractFormatter.wrapWithReportingException(AbstractFormatter.java:304) ~[jmix-reports-2.5.1.jar:na]
at io.jmix.reports.yarg.formatters.impl.DocxFormatter.loadDocument(DocxFormatter.java:137) ~[jmix-reports-2.5.1.jar:na]
at io.jmix.reports.yarg.formatters.impl.DocxFormatter.renderDocument(DocxFormatter.java:82) ~[jmix-reports-2.5.1.jar:na]
at io.jmix.reports.yarg.reporting.Reporting.generateReport(Reporting.java:132) ~[jmix-reports-2.5.1.jar:na]
at io.jmix.reports.yarg.reporting.Reporting.runReport(Reporting.java:91) ~[jmix-reports-2.5.1.jar:na]
at io.jmix.reports.yarg.reporting.Reporting.runReport(Reporting.java:114) ~[jmix-reports-2.5.1.jar:na]
at io.jmix.reports.runner.impl.ReportRunnerImpl.createReportDocumentInternal(ReportRunnerImpl.java:134) ~[jmix-reports-2.5.1.jar:na]
at io.jmix.reports.runner.impl.ReportRunnerImpl.run(ReportRunnerImpl.java:82) ~[jmix-reports-2.5.1.jar:na]
at io.jmix.reportsflowui.runner.impl.UiReportRunnerImpl$2.run(UiReportRunnerImpl.java:200) ~[jmix-reports-flowui-2.5.1.jar:na]
at io.jmix.reportsflowui.runner.impl.UiReportRunnerImpl$2.run(UiReportRunnerImpl.java:194) ~[jmix-reports-flowui-2.5.1.jar:na]
at io.jmix.flowui.backgroundtask.LocalizedTaskWrapper.run(LocalizedTaskWrapper.java:94) ~[jmix-flowui-2.5.1.jar:na]
at io.jmix.flowui.backgroundtask.impl.BackgroundWorkerImpl$TaskExecutorImpl.call(BackgroundWorkerImpl.java:220) ~[jmix-flowui-2.5.1.jar:na]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
at io.jmix.flowui.backgroundtask.impl.BackgroundWorkerImpl$TaskExecutorImpl.lambda$startExecution$0(BackgroundWorkerImpl.java:396) ~[jmix-flowui-2.5.1.jar:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:840) ~[na:na]
Caused by: org.docx4j.openpackaging.exceptions.Docx4JException: Error processing zip file (is it a zip file?)
at org.docx4j.openpackaging.io3.stores.ZipPartStore.(ZipPartStore.java:155) ~[docx4j-core-11.5.3.jar:na]
at org.docx4j.openpackaging.packages.OpcPackage.load(OpcPackage.java:570) ~[docx4j-core-11.5.3.jar:na]
at org.docx4j.openpackaging.packages.OpcPackage.load(OpcPackage.java:421) ~[docx4j-core-11.5.3.jar:na]
at org.docx4j.openpackaging.packages.OpcPackage.load(OpcPackage.java:387) ~[docx4j-core-11.5.3.jar:na]
at org.docx4j.openpackaging.packages.OpcPackage.load(OpcPackage.java:352) ~[docx4j-core-11.5.3.jar:na]
at org.docx4j.openpackaging.packages.WordprocessingMLPackage.load(WordprocessingMLPackage.java:182) ~[docx4j-core-11.5.3.jar:na]
at io.jmix.reports.yarg.formatters.impl.DocxFormatter.loadDocument(DocxFormatter.java:134) ~[jmix-reports-2.5.1.jar:na]
… 15 common frames omitted
Caused by: java.lang.ArithmeticException: integer overflow
at java.base/java.lang.Math.toIntExact(Math.java:1135) ~[na:na]
at org.docx4j.openpackaging.io3.stores.ZipPartStore.getBytesFromInputStream(ZipPartStore.java:181) ~[docx4j-core-11.5.3.jar:na]
at org.docx4j.openpackaging.io3.stores.ZipPartStore.(ZipPartStore.java:146) ~[docx4j-core-11.5.3.jar:na]
… 21 common frames omitted

2025-06-19T13:16:56.157+02:00 ERROR 16648 — [undTask-0-admin] i.j.f.backgroundtask.BackgroundWorker : Exception occurred in background task

io.jmix.reports.exception.ReportingException: An error occurred while reading docx template. File name [modificado.docx]. Template name [modificado.docx] Report name [PRUEBAAA - EELL - WORD Análisis Detallado ]
Error processing zip file (is it a zip file?)
integer overflow
at io.jmix.reports.runner.impl.ReportRunnerImpl.createReportDocumentInternal(ReportRunnerImpl.java:161) ~[jmix-reports-2.5.1.jar:na]
at io.jmix.reports.runner.impl.ReportRunnerImpl.run(ReportRunnerImpl.java:82) ~[jmix-reports-2.5.1.jar:na]
at io.jmix.reportsflowui.runner.impl.UiReportRunnerImpl$2.run(UiReportRunnerImpl.java:200) ~[jmix-reports-flowui-2.5.1.jar:na]
at io.jmix.reportsflowui.runner.impl.UiReportRunnerImpl$2.run(UiReportRunnerImpl.java:194) ~[jmix-reports-flowui-2.5.1.jar:na]
at io.jmix.flowui.backgroundtask.LocalizedTaskWrapper.run(LocalizedTaskWrapper.java:94) ~[jmix-flowui-2.5.1.jar:na]
at io.jmix.flowui.backgroundtask.impl.BackgroundWorkerImpl$TaskExecutorImpl.call(BackgroundWorkerImpl.java:220) ~[jmix-flowui-2.5.1.jar:na]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
at io.jmix.flowui.backgroundtask.impl.BackgroundWorkerImpl$TaskExecutorImpl.lambda$startExecution$0(BackgroundWorkerImpl.java:396) ~[jmix-flowui-2.5.1.jar:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:840) ~[na:na]

2025-06-19T14:21:34.935+02:00 WARN 16648 — [alina-utility-1] i.j.f.f.s.c.b.AbstractGridSettingsBinder : DataGrid contains one or more columns without key specified, settings for them will not be stored
2025-06-19T14:21:34.939+02:00 WARN 16648 — [alina-utility-1] i.j.f.f.s.c.b.AbstractGridSettingsBinder : DataGrid contains one or more columns without key specified, settings for them will not be stored