poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Hatton" <khat...@axiomsystems.com>
Subject RE: getOutputStream() has already been called
Date Fri, 21 Sep 2007 15:34:48 GMT
Try running the Java process (assuming 1.4+) with
-Djava.awt.headless=true

Keith


-----Original Message-----
From: Bruce Altner [mailto:bruce.altner-1@nasa.gov] 
Sent: 21 September 2007 16:27
To: POI Users List
Subject: Re: getOutputStream() has already been called


OK, it seems my problem was not with the OutputStream but rather with
the autosize feature. Just before writing to the workbook I autosize all
the
columns:

   for (int j=0; j< fields.length;j++) {
      s.autoSizeColumn((short)j); //adjust width of this column
   }

Locally this works but with the reverse proxy this causes a
java.lang.NoClassDefFoundError:


        270          Exception:  java.lang.NoClassDefFoundError
        271          Stack Trace follows:
        272          java.lang.NoClassDefFoundError
        273          at java.lang.Class.forName0(Native Method)
        274          at java.lang.Class.forName(Class.java:141)
        275          at
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnviron
ment
.java:62)
        276          at java.awt.Font.initializeFont(Font.java:308)
        277          at java.awt.Font.initFromMap(Font.java:413)
        278          at java.awt.Font.(Font.java:374)
        279          at java.awt.Font.get(Font.java:447)
        280          at java.awt.Font.getFont(Font.java:432)
        281          at
java.awt.font.TextLayout.singleFont(TextLayout.java:544)
        282          at java.awt.font.TextLayout.(TextLayout.java:606)
        283          at
org.apache.poi.hssf.usermodel.HSSFSheet.autoSizeColumn(HSSFSheet.java:14
15)

This may be because it cannot find a local graphics environment when
reverse proxied. Is there a workaround?

Thanks,
Bruce


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Mime
View raw message