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 2023/06/30 05:34:36 UTC
[Bug 66675] New: Save not happening in work book showing A part with the name '/docProps/core.xml' already exists
https://bz.apache.org/bugzilla/show_bug.cgi?id=66675
Bug ID: 66675
Summary: Save not happening in work book showing A part with
the name '/docProps/core.xml' already exists
Product: POI
Version: 5.2.3-FINAL
Hardware: PC
Status: NEW
Severity: blocker
Priority: P2
Component: XSSF
Assignee: dev@poi.apache.org
Reporter: prabhuaus@gmail.com
Target Milestone: ---
Created attachment 38595
--> https://bz.apache.org/bugzilla/attachment.cgi?id=38595&action=edit
This attachment shows the error
Hi
I am using apche poi ooxm-5.2.3 version and i was tried older version also.
I have used apache poi for reading the xlsx sheets and removing the selected
tabs that is working fine after deletion the save not happen it throwing the
following error.
org.apache.poi.openxml4j.exceptions.InvalidOperationException: A part with the
name '/docProps/core.xml' already exists : Packages shall not contain
equivalent part names and package implementers shall neither create nor
recognize packages with equivalent part names. [M1.12]
at
org.apache.poi.openxml4j.opc.OPCPackage.addPackagePart(OPCPackage.java:947)
at
org.apache.poi.openxml4j.opc.ZipPackage.saveImpl(ZipPackage.java:547)
at org.apache.poi.openxml4j.opc.OPCPackage.save(OPCPackage.java:1496)
at org.apache.poi.ooxml.POIXMLDocument.write(POIXMLDocument.java:227)
at
com.simplilearn.mavenexample.Authentication.getWorkbook(Authentication.java:691)
at
com.simplilearn.mavenexample.Authentication.exportToFile(Authentication.java:656)
at com.simplilearn.mavenexample.App.main(App.java:29)
So as per my understanding whenever edit happens using the apche poi it try to
create new OPC package part checks existing part so that time the error
displayed.
For testing purpose i have deleted the package part then it was allowed for
SAVE.
The JAVA code is pretty straight forward.
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
XSSFWorkbook testWorkBook = new XSSFWorkbook(inputfile);
testWorkBook.removeSheetAt(0);
testWorkBook.write(bos);
}
catch(Exception e) {
e.printStackTrace();
}
Observations:
1.Once opened XLSX even without change also not allowed for save
2.The part name removal working only for windows Environment not LINUX server
--
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 66675] Save not happening in work book showing A part with the name '/docProps/core.xml' already exists
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66675
--- Comment #3 from Prabhakaran <pr...@gmail.com> ---
Hi please find the attached file,we have developing new POC using apache POI so
there is no Test case, this is actual code.
Note:the file directly get it from POWER BI api, if we have download the file
then save as manually after checking it will work properly but our requirement
handle the input file dynamically(runtime) so that time i have faced that
error.
its not related to file issue
--
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 66675] Save not happening in work book showing A part with the name '/docProps/core.xml' already exists
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66675
PJ Fanning <fa...@yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|blocker |normal
OS| |All
Status|NEW |NEEDINFO
--- Comment #1 from PJ Fanning <fa...@yahoo.com> ---
That code is not a test case - where does inputFile param come from? You will
need to provide the 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 66675] Save not happening in work book showing A part with the name '/docProps/core.xml' already exists
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66675
Prabhakaran <pr...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |blocker
Priority|P2 |P1
--
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 66675] Save not happening in work book showing A part with the name '/docProps/core.xml' already exists
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66675
--- Comment #2 from Prabhakaran <pr...@gmail.com> ---
Created attachment 38596
--> https://bz.apache.org/bugzilla/attachment.cgi?id=38596&action=edit
Input 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 66675] Save not happening in work book showing A part with the name '/docProps/core.xml' already exists
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66675
Dominik Stadler <do...@gmx.at> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #7 from Dominik Stadler <do...@gmx.at> ---
Should be fixed on latest trunk version.
--
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 66675] Save not happening in work book showing A part with the name '/docProps/core.xml' already exists
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66675
--- Comment #5 from Prabhakaran <pr...@gmail.com> ---
Any luck/update?
--
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 66675] Save not happening in work book showing A part with the name '/docProps/core.xml' already exists
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66675
PJ Fanning <fa...@yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|blocker |normal
--- Comment #6 from PJ Fanning <fa...@yahoo.com> ---
have a look at the comment from 2023-07-12 12:30:54 UTC
--
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 66675] Save not happening in work book showing A part with the name '/docProps/core.xml' already exists
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66675
Prabhakaran <pr...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--
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 66675] Save not happening in work book showing A part with the name '/docProps/core.xml' already exists
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66675
--- Comment #4 from PJ Fanning <fa...@yahoo.com> ---
added r1910949
--
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