EasyXLS
http://forum.easyxls.com/

awt.Head???Exception thrown by invoking easy_WriteExcelFile
http://forum.easyxls.com/viewtopic.php?f=4&t=1192
Page 1 of 1

Author:  t.heck [ Wed May 20, 2009 4:00 am ]
Post subject:  awt.Head???Exception thrown by invoking easy_WriteExcelFile

Hi,

we are using your EasyXLS Writer for Java Server Edition v6 to create an Excel document to be provided for download.

There is an Exception thrown by invoking easy_WriteExcelFile I can't figure out why.

Code:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
java.awt.Head???Exception:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
   at sun.awt.HeadlessToolkit.getScreenResolution(Unknown Source)
   at EasyXLS.Util.Conversion.ByteConversion.getStringHeight(SourceFile:1680)
   at EasyXLS.Util.Conversion.ByteConversion.computeRowHeight(SourceFile:2405)
   at EasyXLS.ExcelDocument.b(SourceFile:11676)
   at EasyXLS.ExcelDocument.easy_WriteExcelFile(SourceFile:4994)


We are not using any GUI components in our application, so why is this awt method called?
And how to prevent this from happening?

By the way, cencoring your own exception is also a way to keep feedback minimal.

Author:  oana [ Wed May 20, 2009 7:16 am ]
Post subject:  awt.Head???Exception thrown by invoking easy_WriteExcelFile

Hi,

This is an error specific for Unix platforms only.

The graphics is used to compute the column width or the row height. The dimensions are computed according to the graphic environment installed on the computer. If no graphics (like X11 graphics) is installed or the headerless mode is used then you will get the exception. The X11 graphics or any other graphic library must be installed on your server.

You can manually set the column width and the row height. In this way the automatic column dimension is no longer computed according to the graphic environment.
Please check the User Guide:
http://www.easyxls.com/manual/index.html
EasyXLS Basics/Cell formatting/Row Height and Column Width chapter

or

You can read the following link for directions on setting the graphics
environment to work:
http://forum.java.sun.com/thread.jspa?t ... ID=1377726

Author:  t.heck [ Wed May 20, 2009 7:30 am ]
Post subject: 

thanks for the quick response.

Author:  oana [ Thu May 21, 2009 3:02 am ]
Post subject:  awt.Head???Exception thrown by invoking easy_WriteExcelFile

You very welcome.

Page 1 of 1 All times are UTC - 4 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/