[Bug 61703] New: Fail to save stream with OpenXML4JRuntimeException

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 61703] New: Fail to save stream with OpenXML4JRuntimeException

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61703

            Bug ID: 61703
           Summary: Fail to save stream with OpenXML4JRuntimeException
           Product: POI
           Version: 3.15-FINAL
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLF
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: ---

Hi Team,

Although the reproduction procedure is unknown, Excel export fails with the
following exception being output.

2017-10-27 21:23:21,867 Caesium-1-4 INFO ServiceRunner    
[c.a.j.p.h.service.connect.InstallGlancesJobHandler] There is no link to
HipChat, no need to install glances.
2017-10-27 21:34:48,669 http-nio-8081-exec-17 ERROR    
[o.a.c.c.C.[.[localhost].[/jira].[default]] Servlet.service() for servlet
[default] in context with path [/jira] threw exception
org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException: Fail to save: an
error occurs while saving the package : The part /docProps/core.xml fail to be
saved in the stream with marshaller
org.apache.poi.openxml4j.opc.internal.marshallers.ZipPackagePropertiesMarshaller@5c5d22d0
        at
org.apache.poi.openxml4j.opc.ZipPackage.saveImpl(ZipPackage.java:602)
        at org.apache.poi.openxml4j.opc.OPCPackage.save(OPCPackage.java:1557)
        at org.apache.poi.POIXMLDocument.write(POIXMLDocument.java:248)
        at
jp.ricksoft.plugins.wbsgantt_excel.xl.XLSXGenerator.writeTo(XLSXGenerator.kt:45)
        at
jp.ricksoft.plugins.wbsgantt.export.XLSXWriter.writeTo(XLSXWriter.kt:25)
        at
jp.ricksoft.plugins.wbsgantt.export.XLSXWriter.writeTo(XLSXWriter.kt:15)
        at
com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:302)
        ... 5 filtered
        at
com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:154)
        ... 1 filtered
        at
com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:68)
        ... 33 filtered
        at
com.atlassian.servicedesk.internal.web.OperationalStatusAwareHttpFilter.doFilter(OperationalStatusAwareHttpFilter.java:31)
        ... 8 filtered
        at
com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
        ... 53 filtered
        at
com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:76)
        at
com.atlassian.jira.security.JiraSecurityFilter$$Lambda$655/1940324629.doFilter(Unknown
Source)
        ... 1 filtered
        at
com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:74)
        ... 16 filtered
        at
com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:37)
        ... 20 filtered
        at
com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
        ... 5 filtered
        at
com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.lambda$invokeFilterChain$0(CustomerContextSettingFilter.java:181)
        at
com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter$$Lambda$1021/1377745274.call(Unknown
Source)
        at
com.atlassian.servicedesk.internal.utils.context.ReentrantThreadLocalBasedCodeContext.rteInvoke(ReentrantThreadLocalBasedCodeContext.java:142)
        at
com.atlassian.servicedesk.internal.utils.context.ReentrantThreadLocalBasedCodeContext.runOutOfContext(ReentrantThreadLocalBasedCodeContext.java:94)
        at
com.atlassian.servicedesk.internal.utils.context.CustomerContextServiceImpl.runOutOfCustomerContext(CustomerContextServiceImpl.java:64)
        at
com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.outOfCustomerContext(CustomerContextSettingFilter.java:174)
        at
com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilterImpl(CustomerContextSettingFilter.java:130)
        at
com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilter(CustomerContextSettingFilter.java:121)
        ... 4 filtered
        at
com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:32)
        ... 8 filtered
        at
com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
        ... 4 filtered
        at
com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36)
        ... 29 filtered
        at
com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
        ... 27 filtered
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.poi.openxml4j.exceptions.OpenXML4JException: The part
/docProps/core.xml fail to be saved in the stream with marshaller
org.apache.poi.openxml4j.opc.internal.marshallers.ZipPackagePropertiesMarshaller@5c5d22d0
        at
org.apache.poi.openxml4j.opc.ZipPackage.saveImpl(ZipPackage.java:582)
        ... 245 more
2017-10-27 22:23:19,293 Caesium-1-3 INFO ServiceRunner    
[c.a.j.p.h.service.ping.RefreshConnectionStatusJobHandler] Running
RefreshConnectionStatusJobHandler...


Apache POI 3.15
Server version: Apache Tomcat/8.0.38
Server built:   Oct 6 2016 20:51:55 UTC
Server number:  8.0.38.0
OS Name:        Linux
OS Version:     2.6.32-358.el6.x86_64
Architecture:   amd64
JVM Version:    1.8.0_25-b17
JVM Vendor:     Oracle Corporation


I found the following bug report, but I do not know how to reproduce it in
detail or how to handle it, so please let me know.

http://apache-poi.1045710.n5.nabble.com/Fail-to-save-stream-td5723711.html

Best regards,
Ryosuke Kumai

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61703] Fail to save stream with OpenXML4JRuntimeException

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61703

--- Comment #1 from Javen O'Neal <[hidden email]> ---
Relevant portions of the stack trace:

> org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException: Fail to save: an
> error occurs while saving the package : The part /docProps/core.xml fail to be
> saved in the stream with marshaller
> org.apache.poi.openxml4j.opc.internal.marshallers.ZipPackagePropertiesMarshaller@5c5d22d0
>         at org.apache.poi.openxml4j.opc.ZipPackage.saveImpl(ZipPackage.java:602)
>         at org.apache.poi.openxml4j.opc.OPCPackage.save(OPCPackage.java:1557)
>         at org.apache.poi.POIXMLDocument.write(POIXMLDocument.java:248)
>
> Caused by: org.apache.poi.openxml4j.exceptions.OpenXML4JException: The part
> /docProps/core.xml fail to be saved in the stream with marshaller
> org.apache.poi.openxml4j.opc.internal.marshallers.ZipPackagePropertiesMarshaller@5c5d22d0
>         at org.apache.poi.openxml4j.opc.ZipPackage.saveImpl(ZipPackage.java:582)
>         ... 245 more

From the stack trace, this error occurred while saving an OOXML file.

(In reply to Andrei Ivanov from POI Users mailing list)
> I have a hunch that the http request just gets aborted/reset so the
> output stream just gets closed.

> I'll probably wait for the next release to include it in our next
> release and then I'll follow the logs.

Have you looked into either of these?
Are you able to check if your output stream is getting closed before POI can
finish writing to it?
Do you have any logs to indicate what is happening on this platform?
Is this repeatable?
How many times are you writing out the workbook?
Are you able to write out the workbook to a ByteArrayOutputStream and then
write that BAOS to the desired OutputStream? This would help you figure out if
the problem is with POI or with the output stream getting closed unexpectedly.

class XLSXGenerator {
    void writeTo(XSSFWorkbook workbook, OutputStream out) {
        try (OutputStream baos = new ByteArrayOutputStream(8192)) {
            try {
                workbook.write(baos);
            } finally {
                workbook.close();
            }
            baos.writeTo(out);
        }
    }
}

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]