Hello.
I have a test tomcat webapplication that produces PowerPoint files. it works create on windows. but on solaris it just produce empty file and don’t give out any error message.
here is my code:
package de.connex30.web.action.pptTest;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import javax.media.jai.JAI;
import javax.media.jai.RenderedOp;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
import org.apache.log4j.Logger;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.xpath.XPathAPI;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import com.aspose.powerpoint.Paragraph;
import com.aspose.powerpoint.Picture;
import com.aspose.powerpoint.PptEditException;
import com.aspose.powerpoint.PptImageException;
import com.aspose.powerpoint.Presentation;
import com.aspose.powerpoint.Shape;
import com.aspose.powerpoint.Slide;
import com.aspose.powerpoint.SlideSizeType;
import com.aspose.powerpoint.Slides;
import de.connex30.conneX30API;
import de.connex30.api.conneX30System;
import de.connex30.api.exception.conneX30APIException;
import de.connex30.api.fs.tools.LinkChecker;
import de.connex30.api.search.ObjectSearchDescription;
import de.connex30.beans.ExtendedObjectInstance;
import de.connex30.beans.LayoutDescriptionInstance;
import de.connex30.beans.ObjectDescription;
import de.connex30.beans.ObjectInstance;
import de.connex30.beans.ObjectInstanceListItem;
import de.connex30.beans.helpers.BasicFieldDescription;
import de.connex30.beans.helpers.BooleanImageDescription;
import de.connex30.beans.helpers.BoxDescription;
import de.connex30.beans.helpers.ImageDescription;
import de.connex30.beans.helpers.MultipleContentFieldDescription;
import de.connex30.beans.helpers.TextDescription;
import de.connex30.beans.helpers.TableColumnDescription;
import de.connex30.beans.helpers.TableDescription;
import de.connex30.beans.helpers.TableRowDescription;
import de.connex30.web.action.BasicShowPageAction;
public class PPTTestAction extends BasicShowPageAction {
private static Logger logger = Logger.getLogger(PPTTestAction.class);
private String appPath = “”;
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
// startzeit
long start_time = System.currentTimeMillis();
HttpSession session = request.getSession();
String path = session.getServletContext().getRealPath("/");
appPath = path + File.separator;
String brand = getBrand();
String template = path + File.separator + “ppt_templates” + File.separator + brand + “.pot”;
Presentation pres = new Presentation(new FileInputStream(template));
conneX30System cx30System = conneX30API.getConneXSystem(getConneXSystemName(session));
Collection fo_col = getOICollection(session);
Iterator fo_iter = fo_col.iterator();
// slides erzeugen
Slides tmpss = pres.getSlides();
for (int i = 0; i < fo_col.size() - 1; i++) {
Slide tmps = tmpss.get(0);
pres.cloneSlide(tmps, pres.getSlides().getLastSlidePosition() + 1);
}
int pos = 1;
while (fo_iter.hasNext()) {
ObjectInstanceListItem oili = (ObjectInstanceListItem)fo_iter.next();
ObjectInstance fo_oi = cx30System.getStoreExtension().getObjectInstance(oili, true);
ObjectDescription od2 = cx30System.getRepository().getObjectDescription(“LayoutDescription”);
ObjectSearchDescription osd2 = od2.getObjectSearchDescription();
osd2.setSearchName(“HotStory_PptExport_” + brand);
Collection ld_col = cx30System.getStoreExtension().getObjectInstances(osd2);
Iterator ld_iter = ld_col.iterator();
while (ld_iter.hasNext()) {
ObjectInstanceListItem ldoi = (ObjectInstanceListItem)ld_iter.next();
LayoutDescriptionInstance layout = (LayoutDescriptionInstance)cx30System.getStoreExtension().getObjectInstance(ldoi, true);
layout.setSelectedMediaType(LayoutDescriptionInstance.MEDIA_TYPE_ONLINE_EDIT);
layout.setSelectedBrand(brand);
layout.setAddListeners(false);
if (fo_oi instanceof ExtendedObjectInstance) {
layout.setEditedObjectInstance(fo_oi);
getFoLayout(layout, pres, 0, 0, 0, 0, pos);
}
}
pos++;
}
long end_time = System.currentTimeMillis();
long time_used = end_time - start_time;
Integer pptCount = new Integer(1);
if (session.getAttribute(“pptcount”) == null) {
session.setAttribute(“pptcount”, pptCount);
} else {
pptCount = (Integer)session.getAttribute(“pptcount”);
pptCount = new Integer(pptCount.intValue() + 1);
session.setAttribute(“pptcount”, pptCount);
}
String exportPath = path + File.separator + “ppt_temp” + File.separator + “fo” + “" + pptCount.intValue() + “__” + fo_col.size() + "” + time_used + “" + brand + "” + System.currentTimeMillis() + “.ppt”;
FileOutputStream fout = new FileOutputStream(new File(exportPath));
pres.write(fout);
fout.close();
return mapping.findForward(“success”);
}
private Collection getOICollection (HttpSession session) {
conneX30System cx30System = conneX30API.getConneXSystem(getConneXSystemName(session));
ObjectDescription od1 = cx30System.getRepository().getObjectDescription(“FeatureObject”);
ObjectSearchDescription osd1 = od1.getObjectSearchDescription();
osd1.setSearchName("%");
ArrayList fo_list = new ArrayList();
try {
Collection fo_col = cx30System.getStoreExtension().getObjectInstances(osd1);
int fo_size = fo_col.size();
Object [] fos = fo_col.toArray();
// anzahl der fo ermitteln, max. 20 und min. 1
int fo_anz = (int)(Math.random() * fo_size + 1) % 20 + 1;
logger.debug(“FeatureObjects to export: " + fo_anz);
for (int i = 0; i < fo_anz; i++) {
fo_list.add(fos[(int)(Math.random() * fo_anz)]);
}
} catch (conneX30APIException e) {
e.printStackTrace();
}
return fo_list;
}
private String getBrand () {
String [] brands = {“Bosch”, “Siemens”, “Neff”, “default”, “BSH”};
return brands[(int)(Math.random() * 5)];
}
private void getFoLayout(LayoutDescriptionInstance layout, Presentation pres, int posx, int posy, int w, int h, int slidePosition) {
int pos_x = posx;
int pos_y = posy;
int width = w;
int height = h;
if (layout.getBoxes() != null && layout.getBoxes().size() != 0) {
for (int i = 0; i < layout.getBoxes().size(); i++) {
BoxDescription onebox = (BoxDescription) layout.getBoxes().get(i);
String foDefinition = onebox.getFoDefinitions();
foDefinition = “” " + foDefinition;
pos_y = parseFoDefinition(foDefinition, “top”);
pos_x = parseFoDefinition(foDefinition, “left”);
width = parseFoDefinition(foDefinition, “width”);
height = parseFoDefinition(foDefinition, “height”);
getFoBoxLayout(onebox, pres, pos_x, pos_y, width, height, slidePosition);
}
} else if (layout.getTables() != null && layout.getTables().size() != 0) {
getFoTableLayout(layout, pres, pos_x, pos_y, width, height, slidePosition);
}
}
private void getFoBoxLayout(BoxDescription box, Presentation pres, int posx, int posy, int w, int h, int slidePosition) {
if (box.getLayout() != null) {
getFoLayout(box.getLayout(), pres, posx, posy, w, h, slidePosition);
} else if (box.getItemLayout() != null) {
getFoItemLayout(box, pres, posx, posy, w, h, slidePosition);
} else {
getFoFieldContent(box, pres, posx, posy, w, h, slidePosition);
}
}
private void getFoItemLayout(BoxDescription box, Presentation pres, int posx, int posy, int w, int h, int slidePosition) {
for (int i = 0; i < box.getItems().size(); i++) {
LayoutDescriptionInstance layout = (LayoutDescriptionInstance) box.getItems().get(i);
getFoLayout(layout, pres, posx, posy, w, h, slidePosition);
}
}
private void getFoFieldContent(BoxDescription box, Presentation pres, int posx, int posy, int w, int h, int slidePosition) {
if (box.isPictureBox()) {
if (box.getImageUrl() != null) {
// Bild einfügen
String imgurl = box.getImageUrl();
imgurl = TextExtractor.replaceProz20(imgurl);
try {
InputStream is = new BufferedInputStream(new FileInputStream(appPath + “images” + File.separator + imgurl));
Picture pic1 = new Picture(pres, is);
int picid1 = pres.getPictures().add(pic1);
Slide slide1 = pres.getSlideByPosition(slidePosition);
if (slide1 == null) {
return;
}
String foDefinition = box.getFoDefinitions();
foDefinition = “” " + foDefinition;
int pictureHeight = parseFoDefinition(foDefinition, “height”);
int pictureWidth = parseFoDefinition(foDefinition, “width”);
slide1.getShapes().addPictureFrame(picid1, posx, posy, pictureWidth, pictureHeight); //(box.getImageWidth() * 24), (box.getImageHeight() * 24)); //
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (PptImageException e) {
e.printStackTrace();
} catch (PptEditException e) {
e.printStackTrace();
}
}
} else {
String foDefinition = box.getFoDefinitions();
int height = parseFoDefinition(foDefinition, “height”);
int width = parseFoDefinition(foDefinition, “width”);
try {
Slide slide1 = pres.getSlideByPosition(slidePosition);
if (slide1 == null) {
return;
}
Shape shape1 = slide1.getShapes().addRectangle(posx, posy, 1000, 1000);
if (height != 0) {
shape1.setHeight(height);
}
if (width != 0) {
shape1.setWidth(width);
}
// shape1.addTextFrame(box.getFoFieldContent());
// shape1.getTextFrame().getParagraphs().clear();
Collection li_items = null;
try {
li_items = TextExtractor.getTextFromXML(box.getFoFieldContent()); // getTextFromXML(box.getFoFieldContent());
} catch (Exception e) {
e.printStackTrace();
}
if (li_items == null) {
shape1.addTextFrame(box.getFoFieldContent());
} else {
shape1.addTextFrame(null);
Iterator iter = li_items.iterator();
while (iter.hasNext()) {
String oneitem = (String)iter.next();
Paragraph para = new Paragraph();
para.setText(oneitem);
shape1.getTextFrame().getParagraphs().add(para);
}
}
// shape1.getTextFrame().setWrapText(true);
shape1.getTextFrame().setFitShapeToText(true);
shape1.getTextFrame().getLineFormat().setShowLines(false);
} catch (PptEditException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
private void getFoTableLayout(LayoutDescriptionInstance layout, Presentation pres, int posx, int posy, int w, int h, int slidePosition) {
for (int i = 0; i < layout.getTables().size(); i++) {
TableDescription table = (TableDescription) layout.getTables().get(i);
TableRowDescription row = (TableRowDescription) table.getRows().iterator().next();
for (int j = 0; j < row.getColumns().size(); j++) {
TableColumnDescription column = (TableColumnDescription) row.getColumns().get(j);
}
int rowMultiplikator = 0;
for (int j = 0; j < table.getRows().size(); j++) {
row = (TableRowDescription) table.getRows().get(j);
if (table.isBooleanImage()) {
if (!row.isResultRow()) {
for (int l = 0; l < row.getColumns().size(); l++) {
TableColumnDescription column = (TableColumnDescription) row.getColumns().get(l);
if (column == null) {
continue;
}
int colHeight = parseFoDefinition(column.getFoDefinitions(), “height”) * rowMultiplikator;
insertFoField(column, pres, posx, posy + colHeight, w, h, j, l, slidePosition);
rowMultiplikator++;
}
}
} else {
if (!row.isResultRow()) {
for (int l = 0; l < row.getColumns().size(); l++) {
TableColumnDescription column = (TableColumnDescription) row.getColumns().get(l);
if (column == null) {
continue;
}
int colHeight = parseFoDefinition(column.getFoDefinitions(), “height”) * rowMultiplikator;
insertFoField(column, pres, posx, posy + colHeight, w, h, j, l, slidePosition);
rowMultiplikator++;
}
}
}
}
}
}
private void insertFoField(TableColumnDescription TableColumn, Presentation pres, int posx, int posy, int w, int h, int row, int col, int slidePosition) {
if (TableColumn.hasFieldContent() && ((BasicFieldDescription) TableColumn.getContent()).isValid()) {
if (TableColumn.getContent().toString() != null && ((BasicFieldDescription) TableColumn.getContent()).getFieldType() == “imagefield”) {
// Bild einfügen
int pictureWidth = 0;
int pictureHeight = 0;
String imgurl = “”;//(String)TableColumn.getContent();
if (TableColumn.getContent() instanceof ImageDescription) {
imgurl = ((ImageDescription)TableColumn.getContent()).getUrl();
String foDefinition = ((ImageDescription)TableColumn.getContent()).getFoDefinitions();
pictureWidth = parseFoDefinition(foDefinition, “width”);
pictureHeight = parseFoDefinition(foDefinition, “height”);
//((ImageDescription)TableColumn.getContent()).get
} else if (TableColumn.getContent() instanceof BooleanImageDescription) {
imgurl = ((BooleanImageDescription)TableColumn.getContent()).getTrueUrl();
//String foDefinition = ((BooleanImageDescription)TableColumn.getContent()).getFoDefinitions();
String foDefinition = “” width=”" + ((BooleanImageDescription)TableColumn.getContent()).getFoImageWidth() + “” “;
foDefinition += “height=”” + ((BooleanImageDescription)TableColumn.getContent()).getFoImageHeight() + “” “;
pictureWidth = parseFoDefinition(foDefinition, “width”);
pictureHeight = parseFoDefinition(foDefinition, “height”);
}
imgurl = TextExtractor.replaceProz20(imgurl);
// TableColumn.get
try {
InputStream is = new BufferedInputStream(new FileInputStream(appPath + “images” + File.separator + imgurl));
Picture pic1 = new Picture(pres, is);
int picid1 = pres.getPictures().add(pic1);
Slide slide1 = pres.getSlideByPosition(slidePosition);
if (slide1 == null) {
return;
}
//RenderedOp img = JAI.create(“fileload”, appPath + “images” + File.separator + imgurl);
String leftpx = “”;//cutExtension(box.getLeftinPixel());
String toppx = “”;//cutExtension(box.getTopinPixel());
if (leftpx.equals(”")) {
leftpx = “100”;
}
if (toppx.equals("")) {
toppx = “100”;
}
int ileftpx = new Double(Double.parseDouble(leftpx) * 5).intValue();
int itoppx = new Double(Double.parseDouble(toppx) * 5).intValue();
slide1.getShapes().addPictureFrame(picid1, posx, posy, pictureWidth, pictureHeight);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (PptImageException e) {
e.printStackTrace();
} catch (PptEditException e) {
e.printStackTrace();
}
} else if (TableColumn.hasFieldContent() && ((BasicFieldDescription) TableColumn.getContent()).getFieldType() == “staticfield”) {
if (TableColumn.toString() != null) {
try {
if (!TableColumn.toString().equals("")) {
String foDefinition = TableColumn.getFoDefinitions();
int height = parseFoDefinition(foDefinition, “height”);
int width = parseFoDefinition(foDefinition, “width”);
Slide slide1 = pres.getSlideByPosition(slidePosition);
if (slide1 == null) {
return;
}
Shape shape1 = slide1.getShapes().addRectangle(posx, posy, 1000, 2000);
// shape1.addTextFrame(null);
// shape1.getTextFrame().getParagraphs().clear();
// shape1.addTextFrame(TableColumn.toString());
Collection li_items = null; //getTextFromXML((String)TableColumn.toString());
//
try {
li_items = TextExtractor.getTextFromXML((String)TableColumn.toString());
} catch (Exception e) {
e.printStackTrace();
}
if (li_items == null) {
shape1.addTextFrame(TableColumn.toString());
} else {
Iterator iter = li_items.iterator();
while (iter.hasNext()) {
String oneitem = (String)iter.next();
Paragraph para = new Paragraph();
para.setText(oneitem);
shape1.getTextFrame().getParagraphs().add(para);
}
}
// shape1.getTextFrame().setWrapText(true);
shape1.getTextFrame().setFitShapeToText(true);
shape1.getTextFrame().getLineFormat().setShowLines(false);
}
} catch (PptEditException e) {
e.printStackTrace();
}
}
} else if (TableColumn.hasFieldContent()&& ((BasicFieldDescription) TableColumn.getContent()).getFieldType() == “multiplecontentfield”) {
Iterator items = ((MultipleContentFieldDescription) TableColumn.getContent()).getContentItems().iterator();
StringBuffer sb = new StringBuffer();
while (items.hasNext()) {
Object item = items.next();
sb.append(item.toString());
if (items.hasNext()) {
sb.append(", “);
}
if (((MultipleContentFieldDescription) TableColumn.getContent()).isImageContent(item)) {
} else {
if (((MultipleContentFieldDescription) TableColumn.getContent()).isUseALI()) {
try {
if (item != null && !((String)item).equals(”")) {
Slide slide1 = pres.getSlideByPosition(slidePosition);
if (slide1 == null) {
return;
}
Shape shape1 = slide1.getShapes().addRectangle(posx, posy, 1000, 2000);
// shape1.addTextFrame(null);
// shape1.getTextFrame().getParagraphs().clear();
// shape1.addTextFrame((String)item);
Collection li_items = null; //getTextFromXML((String)item);
try {
li_items = TextExtractor.getTextFromXML((String)item);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (li_items == null) {
shape1.addTextFrame((String)item);
} else {
Iterator iter = li_items.iterator();
while (iter.hasNext()) {
String oneitem = (String)iter.next();
Paragraph para = new Paragraph();
para.setText(oneitem);
shape1.getTextFrame().getParagraphs().add(para);
}
}
// shape1.getTextFrame().setWrapText(true);
shape1.getTextFrame().setFitShapeToText(true);
shape1.getTextFrame().getLineFormat().setShowLines(false);
}
} catch (PptEditException e) {
e.printStackTrace();
}
} else {
try {
if (item != null && !((String)item).equals("")) {
Slide slide1 = pres.getSlideByPosition(slidePosition);
if (slide1 == null) {
return;
}
Shape shape1 = slide1.getShapes().addRectangle(posx, posy, 1000, 2000);
// shape1.addTextFrame(null);
// shape1.getTextFrame().getParagraphs().clear();
// shape1.addTextFrame((String)item);
Collection li_items = null; //getTextFromXML((String)item);
try {
li_items = TextExtractor.getTextFromXML((String)item);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (li_items == null) {
shape1.addTextFrame((String)item);
} else {
Iterator iter = li_items.iterator();
while (iter.hasNext()) {
String oneitem = (String)iter.next();
Paragraph para = new Paragraph();
para.setText(oneitem);
shape1.getTextFrame().getParagraphs().add(para);
}
}
// shape1.getTextFrame().setWrapText(true);
shape1.getTextFrame().setFitShapeToText(true);
shape1.getTextFrame().getLineFormat().setShowLines(false);
}
} catch (PptEditException e) {
e.printStackTrace();
}
}
}
}
} else if (TableColumn.hasFieldContent()) {
if (TableColumn.getFoText() != null && !TableColumn.getFoText().equals("")) {
try {
Slide slide1 = pres.getSlideByPosition(slidePosition);
if (slide1 == null) {
return;
}
Shape shape1 = slide1.getShapes().addRectangle(posx, posy, 1000, 2000);
shape1.addTextFrame(null);
// shape1.getTextFrame().getParagraphs().clear();
if (TableColumn.getContent() instanceof TextDescription) {
TextDescription td = (TextDescription)TableColumn.getContent();
BasicFieldDescription bd = (BasicFieldDescription)TableColumn.getContent();
int a = 0;
// shape1.addTextFrame(td.toString());
Collection items = null; //getTextFromXML(td.toString());
try {
items = TextExtractor.getTextFromXML(td.toString());
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (items == null) {
shape1.addTextFrame(td.toString());
} else {
Iterator iter = items.iterator();
while (iter.hasNext()) {
String oneitem = (String)iter.next();
if (oneitem != null && !oneitem.equals("")) {
Paragraph para = new Paragraph();
para.setText(oneitem);
shape1.getTextFrame().getParagraphs().add(para);
}
}
}
} else {
// shape1.addTextFrame(TableColumn.getFoText());
Collection items = null; //getTextFromXML(TableColumn.getFoText());
try {
items = TextExtractor.getTextFromXML(TableColumn.getFoText());
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (items == null) {
shape1.addTextFrame(TableColumn.getFoText());
} else {
Iterator iter = items.iterator();
while (iter.hasNext()) {
String oneitem = (String)iter.next();
if (oneitem != null && !oneitem.equals("")) {
Paragraph para = new Paragraph();
para.setText(oneitem);
shape1.getTextFrame().getParagraphs().add(para);
}
}
}
}
// shape1.getTextFrame().setWrapText(true);
shape1.getTextFrame().setFitShapeToText(true);
shape1.getTextFrame().getLineFormat().setShowLines(false);
} catch (PptEditException e) {
e.printStackTrace();
}
}
}
}
}
public static String cutExtension (String temp) {
if (temp.endsWith(“mm”)) {
return temp.substring(0, temp.length()-2);
} else if (temp.endsWith(“px”)) {
return temp.substring(0, temp.length()-2);
} else if (temp.endsWith(“pt”)) {
return temp.substring(0, temp.length()-2);
} else {
return temp;
}
}
public static String getExtension (String temp) {
if (temp.endsWith(“mm”)) {
return “mm”;
} else if (temp.endsWith(“px”)) {
return “px”;
} else if (temp.endsWith(“pt”)) {
return “pt”;
} else {
return “none”;
}
}
/**
* parst die fo-definition und liefert den wert zurück
*
* @param foDefinition
* @param key
* @return value
*/
public static int parseFoDefinition (String foDefinition, String key) {
int indexof = foDefinition.indexOf("" " + key + “=”);
if (indexof == -1) {
return -1;
}
// zwei wieder drauf, da wir '" ’ mitgenommen haben
indexof += 2;
// column-number=“1” space-after=“1mm” width=“30mm” height=“15mm”
int keylength = indexof + key.length() + 2;
String temp = foDefinition.substring(keylength);
indexof = temp.indexOf(""");
temp = temp.substring(0, indexof);
String extension = getExtension(temp);
temp = cutExtension(temp);
if (extension.equals(“mm”)) {
// den neuen pixel wert berechnen
if (temp == null) {
temp = “0.0”;
}
double value = Double.parseDouble(temp);
value = value / 25.400;
value = value * 576;
temp = “” + value;
} else if (extension.equals(“px”)) {
} else if (extension.equals(“pt”)) {
}
if (temp == null || temp.equalsIgnoreCase(“null”)) {
return 0;
}
return new Double(Double.parseDouble(temp)).intValue();
}
private Collection getTextFromXML (String xml) {
if (xml.indexOf(">") == -1) {
return null;
}
xml = “” + xml + “”;
ArrayList result = new ArrayList();
Document doc;
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
try {
DocumentBuilder builder = factory.newDocumentBuilder();
doc = builder.parse(new InputSource(new StringReader(xml)));
NodeList list_items = XPathAPI.selectNodeList(doc, “//li”);
for (int i = 0; i < list_items.getLength(); i++) {
if (!(list_items.item(i) instanceof Element)) {
continue;
}
Element item = (Element)list_items.item(i);
result.add(item.getFirstChild().getNodeValue());
}
return result;
} catch (SAXException e) {
e.printStackTrace();
} catch (ParserConfigurationException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} catch (TransformerException e) {
e.printStackTrace();
}
return null;
}
}
Any idea why it doesn’t work on solaris?