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

1 Like

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

Hi,

We have difficulties with reproducing this issue, so there are some questions:

  • Are you able to reproduce issue if you edit templates via online version of Word? Or it is relevant only to desktop one?
  • Is it reproduced on any Docx reports with modified templates or on some of them only?
  • Are you able to reproduce it on some simple sample report? e.g. report for User entity with couple of fields (without any project specific stuff if any). And provide it to us so we can check it.

Also please try to update your Jmix version from 2.5.1 to 2.5.2 - it contains update for related Docx4j libraries. It has been done to solve another issue with MS Word, but maybe it will also help with this one.

Regards,
Ivan

Hi Ivan,
Thank you for your response. We’ve been testing the suggestions you provided, and what ultimately resolved the issue was upgrading Jmix from version 2.5.1 to 2.5.2.

Best regards

1 Like