https://issues.apache.org/bugzilla/show_bug.cgi?id=52211
Bug #: 52211
Summary: OpenXML4JRuntimeException when opening xlsx files on
mainframe
Product: POI
Version: 3.8-dev
Platform: PC
OS/Version: other
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
I am using the POI 3.8 beta 5 (from my own build on 10/06) on mainframe to read
Excel files. Reading/Writing xls file is OK. I am getting the following stack
trace when reading xlsx files.
Exception in thread "main"
org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException: Package.init() :
this exception should never happen, if you read this message please send a mail
to the developers team. : The specified content type
'application/vnd.openxmlformats-package.core-properties+xml' is not compliant
with RFC 2616: malformed content type.
at org.apache.poi.openxml4j.opc.OPCPackage.init(OPCPackage.java:166)
at org.apache.poi.openxml4j.opc.OPCPackage.<init>(OPCPackage.java:141)
at org.apache.poi.openxml4j.opc.ZipPackage.<init>(ZipPackage.java:82)
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:228)
at
org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:67)
at TestWorkbookFactoryCreate.main(TestWorkbookFactoryCreate.java:16)
Here is the output of "java -version".
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pmz31dev-20090707 (SR10
))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 z/OS s390-31 j9vmmz3123-20090707
(JIT enabled)
J9VM - 20090706_38445_bHdSMr
JIT - 20090623_1334_r8
GC - 200906_09)
JCL - 20090705
Output of "uname -a"
OS/390 ABIZOS08 21.00 03 2818
Test code
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.*;
import java.io.FileInputStream;
import java.io.IOException;
public class TestWorkbookFactoryCreate {
public static void main(String[] args) throws IOException, Exception {
FileInputStream fileIn = null;
try
{
fileIn = new FileInputStream("utf8.xlsx");
XSSFWorkbook wb = (XSSFWorkbook) WorkbookFactory.create(fileIn);
System.out.println("Workbook created");
} finally {
if (fileIn != null)
fileIn.close();
}
}
}
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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]