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 2015/02/23 13:12:03 UTC

[Bug 57622] New: 3.11 new call to XMLEventFactory.newFactory() introduces incompatibility with IBM WAS 7 (IBM 1.6 JDK)

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: dev@poi.apache.org
          Reporter: mediocaballero.spam@gmail.com

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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 57622] 3.11 new call to XMLEventFactory.newFactory() introduces incompatibility with IBM WAS 7 (IBM 1.6 JDK)

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

Nick Burch <ap...@gagravarr.org> changed:

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

--- Comment #3 from Nick Burch <ap...@gagravarr.org> ---
Changed in r1661903, thanks for your investigations and help on this!

-- 
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 57622] 3.11 new call to XMLEventFactory.newFactory() introduces incompatibility with IBM WAS 7 (IBM 1.6 JDK)

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

--- Comment #2 from David <me...@gmail.com> ---
I haven't been able to test it, but according to API spec, it shouldn't have
any effect.

newInstance existed since first version of stax api, while newFactoy was
introduced in Oracle 1.6.0.18 'to mantain api consistency', but both have the
same functionality.

http://docs.oracle.com/javase/6/docs/api/javax/xml/stream/XMLEventFactory.html#newInstance(java.lang.String,
java.lang.ClassLoader)

http://upstream.rosalinux.ru/java/compat_reports/jdk/1.6.0.17_to_1.6.0.18/bin_compat_report.html#Added

Also as a reference, other users with the same issue:
http://mail-archives.apache.org/mod_mbox/poi-dev/201501.mbox/%3CFB8F943CCE197F4A8C65545509CA885B0180A24F7FD8@MSGRTPCCRF2WIN.DMN1.FMR.COM%3E

-- 
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 57622] 3.11 new call to XMLEventFactory.newFactory() introduces incompatibility with IBM WAS 7 (IBM 1.6 JDK)

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

Nick Burch <ap...@gagravarr.org> changed:

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

--- Comment #1 from Nick Burch <ap...@gagravarr.org> ---
Do all unit tests still pass on an Orcale JVM after the change?

(We don't want to make the change and break things on other JVMs!)

-- 
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