https://issues.apache.org/bugzilla/show_bug.cgi?id=53576
Priority: P2
Bug ID: 53576
Assignee: [email protected]
Summary: docx file Can't read content types part !
Severity: critical
Classification: Unclassified
Reporter: [email protected]
Hardware: PC
Status: NEW
Version: 3.8
Component: XWPF
Product: POI
Created attachment 29089
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29089&action=edit
POI XWPFDocument Exception screenshot.
Hi Poi,
I have downloaded the poi-3.8 version and gathered all the .jar files and used
the ikvmc.exe (7.1.4532.2) to generate the .net dll. I have used the below
command to generate the poi.dll
>ikvmc.exe commons-logging-1.1.jar dom4j-1.6.1.jar junit-3.8.1.jar
>log4j-1.2.13.jar poi-3.8-20120326.jar poi-ooxml-3.8-20120326.jar
>poi-ooxml-schemas-3.8-20120326.jar poi-scratchpad-3.8-20120326.jar
>stax-api-1.0.1.jar xmlbeans-2.3.0.jar -out:poi.dll
After the poi.dll is generated i have reffered the dll in my .net solution and
tried the below code to parse a word document(.docx).
XWPFDocument document = new XWPFDocument(OPCPackage.open(fileName));
POIXMLProperties.CoreProperties coreProperties =
document.getProperties().getCoreProperties();
It is giving me the below exception.
at org.apache.poi.openxml4j.opc.internal.ContentTypeManager..ctor(InputStream
in, OPCPackage pkg)
at
org.apache.poi.openxml4j.opc.internal.ZipContentTypeManager..ctor(InputStream
in, OPCPackage pkg)
at org.apache.poi.openxml4j.opc.ZipPackage.getPartsImpl()
at org.apache.poi.openxml4j.opc.OPCPackage.getParts()
at org.apache.poi.openxml4j.opc.OPCPackage.open(String path, PackageAccess
access)
at org.apache.poi.openxml4j.opc.OPCPackage.open(String path)
at NPOITestProject.Ole2Document.Ole2DocumentMessageParser.ParseFile(String
fileName) in
D:\Murali\Temp\NPOITestProject\NPOITestProject\Ole2Document\Ole2DocumentMessageParser.cs:line
24
at NPOITestProject.Program.Main(String[] args) in
D:\Murali\Temp\NPOITestProject\NPOITestProject\Program.cs:line 44
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[]
args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext,
ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext,
ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Please explain to me am i doing any thing wrong. Please don't confuse with my
project name i mean Ole2DocumentParser.cs i am simply using a word document
(.docx) for parsing.
Thanks & Regards,
N.Murali Krishna.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]