You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2017/07/13 21:50:06 UTC

[Bug 61297] New: got this message: this error should NEVER happen while trying to copy rows in Excel

https://bz.apache.org/bugzilla/show_bug.cgi?id=61297

            Bug ID: 61297
           Summary: got this message: this error should NEVER happen while
                    trying to copy rows in Excel
           Product: POI
           Version: 3.16-dev
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: ted.ji@wellsfargo.com
  Target Milestone: ---

Created attachment 35132
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35132&action=edit
got this message: this error should NEVER happen!

I was trying to copy some row of data from one part of sheet to another and
then save it to another workbook and I got this error. As it said error should
NEVER Happen I filed this report. Will see what I did wrong.

run:
start test
number of sheets=1
sheet=template_4_8_16
row= 0 27
row=3 no. cells=11 new= 26
... copy rows
row=4 no. cells=11 new= 27
... copy rows
Exception in thread "main"
org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException: Rule M2.4
exception : this error should NEVER happen! If you can provide the triggering
file, then please raise a bug at
https://bz.apache.org/bugzilla/enter_bug.cgi?product=POI and attach the file
that triggers it, thanks!
        at
org.apache.poi.openxml4j.opc.internal.ContentTypeManager.getContentType(ContentTypeManager.java:340)
        at
org.apache.poi.openxml4j.opc.internal.ContentTypeManager.removeContentType(ContentTypeManager.java:253)
        at
org.apache.poi.openxml4j.opc.OPCPackage.removePart(OPCPackage.java:1020)
        at
org.apache.poi.openxml4j.opc.PackagePart.getOutputStream(PackagePart.java:519)
        at
org.apache.poi.xssf.usermodel.XSSFWorkbook.commit(XSSFWorkbook.java:1826)
        at
org.apache.poi.POIXMLDocumentPart.onSave(POIXMLDocumentPart.java:414)
        at org.apache.poi.POIXMLDocument.write(POIXMLDocument.java:242)
        at
modelbacktest_excel.ModelBackTest_excel.main(ModelBackTest_excel.java:53)
Java Result: 1

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 61297] got this message: this error should NEVER happen while trying to copy rows in Excel

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61297

PJ Fanning <fa...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from PJ Fanning <fa...@yahoo.com> ---
Hi Ted,
Can you attach the Backtesting_template.xlsx file and confirm that you are
using poi 3.16?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 61297] got this message: this error should NEVER happen while trying to copy rows in Excel

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61297

Javen O'Neal <on...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #5 from Javen O'Neal <on...@apache.org> ---


*** This bug has been marked as a duplicate of bug 59158 ***

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 61297] got this message: this error should NEVER happen while trying to copy rows in Excel

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61297

Javen O'Neal <on...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #3 from Javen O'Neal <on...@apache.org> ---
Can you also include the code that produced this error message?

This Rule M2.4 occurs when you try to copy an XML bean from one workbook (DOM)
to another.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 61297] got this message: this error should NEVER happen while trying to copy rows in Excel

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61297

--- Comment #2 from Ted Ji <te...@wellsfargo.com> ---
Created attachment 35133
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35133&action=edit
Excel file causing problem

I since fixed my typos but here the info.

I am using poi-3.1.6-beta2 and I've attached the Excel file

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 61297] got this message: this error should NEVER happen while trying to copy rows in Excel

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61297

--- Comment #4 from Javen O'Neal <on...@apache.org> ---
Nevermind. Code is in attachment 35132.

The problem is that you're closing the pkg in a for loop and then closing it
again at the exit.

You should only close the OPCPackage once,and after it's closed, the package
and anything that relies on the package (such as the XSSFWorkbook) can no
longer be used.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org