Free Support Forum - aspose.com

Error Swing when using Worksheet.autoFitColumns

Hi,


I experiment a problem when using Worksheet.autoFitColumns.Here’s the stack:
java.lang.NullPointerException
at javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:133)
at javax.swing.UIDefaults.getUI(UIDefaults.java:742)
at javax.swing.UIManager.getUI(UIManager.java:989)
at javax.swing.JLabel.updateUI(JLabel.java:256)
at javax.swing.JLabel.(JLabel.java:145)
at javax.swing.JLabel.(JLabel.java:216)
at com.aspose.cells.bJ.(Unknown Source)
at com.aspose.cells.in.a(Unknown Source)
at com.aspose.cells.in.(Unknown Source)
at com.aspose.cells.Worksheet.autoFitColumns(Unknown Source)

I’m running aspose on Weblogic 10.3 with jdk160_17.
Do you have an idea to solve that problem
Thanks
Fabien

Hi,

Please try to set a Java environment variable when you run the application:

-Djava.awt.headless=true

Thanks for your quick reply.


It’s working now with thanks to this option.

Fabien