https://bz.apache.org/bugzilla/show_bug.cgi?id=57622
Bug ID: 57622
Summary: 3.11 new call to XMLEventFactory.newFactory()
introduces incompatibility with IBM WAS 7 (IBM 1.6
JDK)
Product: POI
Version: 3.11-FINAL
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: POI Overall
Assignee: [email protected]
Reporter: [email protected]
Hi!
At work we were making use of POI and when we updated the version to 3.11 we
suffered some incompatibility issues. We have IBM WAS 7 servers and are unable
to migrate (easily to WAS 8.5.5). IBMs JDK 1.6 implementation doesn't include
all stax related classes and methods. Namely, we had an issue with POI class
PackagePropertiesMarshaller.java, where it includes:
static
{
XMLEventFactory f = XMLEventFactory.newFactory();
namespaceDC = f.createNamespace("dc", "http://purl.org/dc/elements/1.1/");
namespaceCoreProperties = f.createNamespace("cp",
"http://schemas.openxmlformats.org/package/2006/metadata/core-properties");
namespaceDcTerms = f.createNamespace("dcterms",
"http://purl.org/dc/terms/");
namespaceXSI = f.createNamespace("xsi",
"http://www.w3.org/2001/XMLSchema-instance");
}
IBM implementation has newInstance(), but not newFactory (in Oracle's JVM, it
was introduced in 1.6 fix 18)
We have had to change PackagePropertiesMarshaller.java to use newInstance, so
it could keep on running in our servers:
static
{
XMLEventFactory f = XMLEventFactory.newInstance();
namespaceDC = f.createNamespace("dc", "http://purl.org/dc/elements/1.1/");
namespaceCoreProperties = f.createNamespace("cp",
"http://schemas.openxmlformats.org/package/2006/metadata/core-properties");
namespaceDcTerms = f.createNamespace("dcterms",
"http://purl.org/dc/terms/");
namespaceXSI = f.createNamespace("xsi",
"http://www.w3.org/2001/XMLSchema-instance");
}
As the resultin execution is the same, to mantain compatibility with the
broadest range of servers, I'd suggest to change this particular call.
--
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]