poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ODaniel, Robert L CTR USAF AFMC 72 ABW/SCPT" <Robert.ODaniel....@Tinker.af.mil>
Subject NoSuchMethodError with slide rendering
Date Wed, 13 Jan 2010 14:08:58 GMT
The following code was used in an attempt to draw a slide to an image:

//Create the image buffered in memory and create the graphics to fill
BufferedImage img = new BufferedImage(slideWidth, slideHeight,
BufferedImage.TYPE_INT_RGB);
Graphics2D graphics = img.createGraphics();
FileOutputStream out = new FileOutputStream(filePath);

//fill the buffered graphics with an empty rectangle
graphics.fill(new Rectangle(0, 0, slideWidth, slideHeight);
//render the image into the newly filled Graphics2D object
slide.draw(graphics);

ImageIO.write(img, "png", out);
out.close();

When trying to render the slide to the Graphics2D object, the following
errors are received:
java.lang.NoSuchMethodError:
org.apache.poi.ddf.EscherContainerRecord.getChildIterator()Ljava/util/Iterat
or;
at org.apache.poi.hslf.model.Sheet.getBackground(Sheet.java:356)
at org.apache.poi.hslf.model.Slide.draw(Slide.java:422)
at tsc.util.Extractor.extractPptText(Extractor.java:1473)

Extractor.java is the class where the above code is called. This only
happens from a Solaris server. When deployed to an executable jar and ran
locally, the code works fine. The local machines and the server are all
running JRE 1.6.0_17 and using the POI 3.5 Final version.

The thought occurred that it might be an issue with graphics as the server
has no graphics card, so the executable was set into headless mode using
System.setProperty("java.awt.headless", "true") with no changes.

Can anyone shed some light onto the issue and how it may be resolved?

Thanks,
Bob O'Daniel


Mime
View raw message