[Bug 62966] New: init presetShapeDefinitions.xml fail under IBM jdk

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 62966] New: init presetShapeDefinitions.xml fail under IBM jdk

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62966

            Bug ID: 62966
           Summary: init presetShapeDefinitions.xml fail under IBM jdk
           Product: POI
           Version: 3.17-FINAL
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLF
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: ---

i want to read the ppt/pptx and draw into images
here is some test:
{
BufferedImage img = new BufferedImage(100, 100, BufferedImage.TYPE_INT_RGB);
try {
        SlideShow ss =
SlideShowFactory.create(Init.class.getClassLoader().getResourceAsStream("ppt.ppt"));
        List<? extends Slide> slide = ss.getSlides();
        Graphics2D graphics = img.createGraphics();
        slide.get(0).draw(graphics);
} catch (Exception e) {
        e.printStackTrace();
}
try {
        SlideShow ss =
SlideShowFactory.create(Init.class.getClassLoader().getResourceAsStream("ppt.pptx"));
        List<? extends Slide> slide = ss.getSlides();
        Graphics2D graphics = img.createGraphics();
        slide.get(0).draw(graphics);
} catch (Exception e) {
        e.printStackTrace();
}
System.out.println("fin");
}
when run this code under oracle or openjdk it's all ok.
but when run in websphere, it always brings a RuntimeException like this:
java.lang.RuntimeException: java.lang.IllegalStateException: reader must be on
a START_ELEMENT event, not a 4 event
        at
org.apache.poi.sl.draw.geom.PresetGeometries.getInstance(PresetGeometries.java:115)
        at
org.apache.poi.hslf.usermodel.HSLFSimpleShape.getGeometry(HSLFSimpleShape.java:341)
        at
org.apache.poi.sl.draw.DrawSimpleShape.computeOutlines(DrawSimpleShape.java:390)
        at org.apache.poi.sl.draw.DrawSimpleShape.draw(DrawSimpleShape.java:75)
        at org.apache.poi.sl.draw.DrawSheet.draw(DrawSheet.java:67)
        at org.apache.poi.sl.draw.DrawSlide.draw(DrawSlide.java:39)
        at org.apache.poi.hslf.usermodel.HSLFSlide.draw(HSLFSlide.java:467)
        at ppt.Init.main(Init.java:19)
Caused by: java.lang.IllegalStateException: reader must be on a START_ELEMENT
event, not a 4 event
        at
com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:455)
        at
com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:433)
        at
org.apache.poi.sl.draw.geom.PresetGeometries.init(PresetGeometries.java:75)
        at
org.apache.poi.sl.draw.geom.PresetGeometries.getInstance(PresetGeometries.java:110)
        ... 7 more
java.lang.RuntimeException: java.lang.IllegalStateException: reader must be on
a START_ELEMENT event, not a 4 event
        at
org.apache.poi.sl.draw.geom.PresetGeometries.getInstance(PresetGeometries.java:115)
        at
org.apache.poi.xslf.usermodel.XSLFSimpleShape.getGeometry(XSLFSimpleShape.java:686)
        at
org.apache.poi.sl.draw.DrawSimpleShape.computeOutlines(DrawSimpleShape.java:390)
        at org.apache.poi.sl.draw.DrawSimpleShape.draw(DrawSimpleShape.java:75)
        at org.apache.poi.sl.draw.DrawSheet.draw(DrawSheet.java:67)
        at org.apache.poi.sl.draw.DrawSlide.draw(DrawSlide.java:39)
        at org.apache.poi.xslf.usermodel.XSLFSlide.draw(XSLFSlide.java:301)
        at ppt.Init.main(Init.java:27)
Caused by: java.lang.IllegalStateException: reader must be on a START_ELEMENT
event, not a 4 event
        at
com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:455)
        at
com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:433)
        at
org.apache.poi.sl.draw.geom.PresetGeometries.init(PresetGeometries.java:75)
        at
org.apache.poi.sl.draw.geom.PresetGeometries.getInstance(PresetGeometries.java:110)
        ... 7 more
fin


the ibm jdk version I've test is
java version "1.8.0"
Java(TM) SE Runtime Environment (build pxa6480sr2fp10ifix-20160223_01(SR2
FP10+IV81318+IV81645+IV81741+IV81716))
IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References
20160210_289934 (JIT enabled, AOT enabled)
J9VM - R28_Java8_SR2_20160210_1617_B289934
JIT  - tr.r14.java_20151209_107110.04
GC   - R28_Java8_SR2_20160210_1617_B289934_CMPRSS
J9CL - 20160210_289934)
JCL - 20151231_01 based on Oracle jdk8u71-b15

And

java version "1.7.0"
Java(TM) SE Runtime Environment (build pxa6470sr4fp1ifix-20130423_02(SR4
FP1+IV38579+IV38399+IV40208))
IBM J9 VM (build 2.6, JRE 1.7.0 Linux amd64-64 Compressed References
20130421_145945 (JIT enabled, AOT enabled)
J9VM - R26_Java726_SR4_FP1_2_20130421_2353_B145945
JIT  - r11.b03_20130131_32403ifx4
GC   - R26_Java726_SR4_FP1_2_20130421_2353_B145945_CMPRSS
J9CL - 20130422_145945)
JCL - 20130225_01 based on Oracle 7u13-b08

Is this a poi bug when use xmlreader to initialize presetShapeDefinitions.xml
or a ibm jdk xmlreader bug processing xml element event

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 62966] init presetShapeDefinitions.xml fail under IBM jdk

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62966

--- Comment #1 from PJ Fanning <[hidden email]> ---
If you can load the ppt using one JDK and not another, then I'd suggest that
the issue is likely to be in the second JDK.
Could you try upgrading your JDK and if IBM JDK continues to be an issue, could
you try up to date versions of OpenJDK or Oracle JDK?

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 62966] init presetShapeDefinitions.xml fail under IBM jdk

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62966

--- Comment #2 from scmodabc <[hidden email]> ---
(In reply to PJ Fanning from comment #1)
> If you can load the ppt using one JDK and not another, then I'd suggest that
> the issue is likely to be in the second JDK.
> Could you try upgrading your JDK and if IBM JDK continues to be an issue,
> could you try up to date versions of OpenJDK or Oracle JDK?

I have tried to install up to date ibm jdk,and encountered a RuntimeException
as before.
ibm jdk version:
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 8.0.5.26 -
pxa6480sr5fp26-20181115_03(SR5 FP26))
IBM J9 VM (build 2.9, JRE 1.8.0 Linux amd64-64-Bit Compressed References
20181106_401576 (JIT enabled, AOT enabled)
OpenJ9   - fde1d6f
OMR      - d8c3617
IBM      - 5c4a9f0)
JCL - 20181022_01 based on Oracle jdk8u191-b26
while newest OpenJDK and OracleJDK works fine
perhaps I have to configure websphere to use openjdk or oraclejdk.
Thank you

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 62966] init presetShapeDefinitions.xml fail under IBM jdk

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62966

--- Comment #3 from PJ Fanning <[hidden email]> ---
Maybe you should report this JAXB issue to IBM.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 62966] init presetShapeDefinitions.xml fail under IBM jdk

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62966

--- Comment #4 from scmodabc <[hidden email]> ---
(In reply to PJ Fanning from comment #3)
> Maybe you should report this JAXB issue to IBM.

yes,I have make my effort to find how to report this issue to IBM, but the
official forum always went wrong. It response 400 bad request with follow
message :
Yikes — we didn't catch all of that.
Something went wrong someplace.
I'll try again some time later

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 62966] init presetShapeDefinitions.xml fail under IBM jdk

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62966

Andreas Beeker <[hidden email]> changed:

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

--- Comment #5 from Andreas Beeker <[hidden email]> ---
fixed via r1848494

see also
https://stackoverflow.com/questions/28860131/illegalstateexception-when-unmarshalling-from-child-node-with-xmleventreader

Currently the IBM build isn't successful, as there is an encryption bug ... but
I'm on it

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 62966] init presetShapeDefinitions.xml fail under IBM jdk

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62966

Andreas Beeker <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|PC                          |All
          Component|XSLF                        |SL Common
            Version|3.17-FINAL                  |4.0.x-dev
                 OS|Linux                       |All

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 62966] init presetShapeDefinitions.xml fail under IBM jdk

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62966

Andreas Beeker <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |62994


Referenced Bugs:

https://bz.apache.org/bugzilla/show_bug.cgi?id=62994
[Bug 62994] IBM JCE workarounds
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 62966] init presetShapeDefinitions.xml fail under IBM jdk

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62966

--- Comment #6 from scmodabc <[hidden email]> ---
(In reply to Andreas Beeker from comment #5)
> fixed via r1848494
>
> see also
> https://stackoverflow.com/questions/28860131/illegalstateexception-when-
> unmarshalling-from-child-node-with-xmleventreader
>
> Currently the IBM build isn't successful, as there is an encryption bug ...
> but I'm on it

Yes, it works!~~Thanks very much
But it still makes me confused why the event filterReader failed.
The answer from stackoverflow tells "when you pass it to the Unmarshaller it is
going to ask for the next event",doesn't it means the reader "cursor" is at the
position of, for example:
    <accentBorderCallout1>
   ↑here
and the unmarsheller call of next will return a START_ELEMENT?
I think it has the same meaning of the documentation of what filterRead.peek()
say : "A call to peek() will be equal to the next return of next()".

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]