We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Setting up Headless Mode to avoid server crash when using Apose.Cells 8.1.2 for Java

Hi,


our customer is reporting that Aspose.Cells 8.1.2 is crashing the application server JBoss with the following stack trace (also attached). Is there any quick workaround for that?

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j sun.font.FontManager.getFontPath(Z)Ljava/lang/String;+0
v ~StubRoutines::call_stub
J sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
J sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
J java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
j com.aspose.cells.a.d.fr.p()V+196
j com.aspose.cells.a.d.fr.(Z)V+45
j com.aspose.cells.WorkbookSettings.(Lcom/aspose/cells/Workbook;I)V+295
j com.aspose.cells.Workbook.()V+87

Thanks,
Mariusz

Hi Mariusz,

Thanks for your posting and using Aspose.Cells.

For this issue, please try following JVM option when starting the java application:

-Djava.awt.headless=true

or

-DAspose.Cells.Disable=SunFontManager

Thanks, I will try that.


Mariusz

Hi Mariusz,

Thanks for your posting and using Aspose.Cells.

Hopefully,
the solution provided by us will enable you to use Aspose.Cells
without any issue. In case, you find any other question or face any
other issue, please feel free to post on our forums, we will be glad to
look into it and help you asap.

Please note that when processing many features in workbook, we need font information and
try to use the FontManager in JDK to get font paths automatically.
However, for some environments and different JDKs, FontManager may not
work and cause error. So we provide
options(Aspose.Cells.Disable=SunFontManager) to avoid the invocation for
this class. “java.awt.headless=true” is Java’s builtin option and it
can also void the invocation of FontManager. In fact
“java.awt.headless=true” can avoid more exceptions than this one, if
your issue is about error like “Can’t connect to X11 window server” for
Unix/Linux environment, you will have to use this option. More details
please refer to the page:
( http://www.oracle.com/technetwork/articles/javase/headless-136834.html )