Bug 60427 - Creating pictures in PowerPoint slides requires scratchpad-jar for adding WMF images
Summary: Creating pictures in PowerPoint slides requires scratchpad-jar for adding WMF...
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: XSLF (show other bugs)
Version: 3.16-dev
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-28 10:53 UTC by Dominik Stadler
Modified: 2016-11-28 20:52 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominik Stadler 2016-11-28 10:53:27 UTC
The Jenkins CI job which tries to run ooxml-tests without scratchpad currently fails at the following test, this indicates that currently Scratchpad is required for handling WMF pictures. See https://builds.apache.org/job/POI-no-scratchpad/lastFailedBuild/testReport/org.apache.poi.xslf/TestXSLFBugs/bug59434/ for details

Should we move these classes to main to not have this discouraged dependency from ooxml to scatchpad?


Error Message

org/apache/poi/hslf/blip/WMF$NativeHeader

Stacktrace

java.lang.NoClassDefFoundError: org/apache/poi/hslf/blip/WMF$NativeHeader
	at org.apache.poi.xslf.usermodel.XSLFPictureData.cacheProperties(XSLFPictureData.java:179)
	at org.apache.poi.xslf.usermodel.XSLFPictureData.getImageDimension(XSLFPictureData.java:145)
	at org.apache.poi.sl.draw.DrawPictureShape.resize(DrawPictureShape.java:100)
	at org.apache.poi.xslf.usermodel.XSLFSheet.createPicture(XSLFSheet.java:238)
	at org.apache.poi.xslf.TestXSLFBugs.bug59434(TestXSLFBugs.java:466)
Caused by: java.lang.ClassNotFoundException: org.apache.poi.hslf.blip.WMF$NativeHeader
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Comment 1 Andreas Beeker 2016-11-28 11:29:59 UTC
I've already started yesterday to split them.
The solution for *slf is finished, i.e. I've created ImageHeader* classes in the main jar, but there are other OOXML->scratchpad issues to solve.
Comment 2 Dominik Stadler 2016-11-28 19:32:39 UTC
Yes, thanks, I  just go one issue after the other to finally remove this dependency. 

A few unit tests related to text-extraction are ignored right now as they include files for scratchpad-related formats, we`ll see if there are other problems after this one.
Comment 3 Andreas Beeker 2016-11-28 20:52:33 UTC
first issues patched via r1771812

to be continued ...