Error while Deploying other enviroment

While running the code for aspose.note conversion in local machine, it doesn’t throw any exception (successfully process) but then i deploy the same code (with same license) in
deployment server , it throws while creating creating Document Object. I am using aspose.note 18.3 version.
Code snippet: Where is throwing exception.

Document document = new Document(contentInputStream, loadopts);

Deployment Enviroment : (AWS)Ubuntu 64 bit ( spring based project) It pull all the jar from
nexus repo. , jdk1.8

[2018-07-03 10:20:20,484] ERROR [] [] [] [http-nio-9000-exec-8] [DirectJDKLog.java:181] - Servlet.service() for servlet [dispatcherServlet] in context with path [/sharepoint] threw exception [Handler dispatch failed; nested exception is java.lang.ExceptionInInitializerError] with root cause
java.lang.NullPointerException: null
at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264)
at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:219)
at sun.awt.FontConfiguration.init(FontConfiguration.java:107)
at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:774)
at sun.font.SunFontManager$2.run(SunFontManager.java:431)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.SunFontManager.(SunFontManager.java:376)
at sun.awt.FcFontManager.(FcFontManager.java:35)
at sun.awt.X11FontManager.(X11FontManager.java:57)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
at sun.java2d.SunGraphicsEnvironment.getFontManagerForSGE(SunGraphicsEnvironment.java:201)
at sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphicsEnvironment.java:235)
at sun.java2d.HeadlessGraphicsEnvironment.getAvailableFontFamilyNames(HeadlessGraphicsEnvironment.java:97)
at com.aspose.note.internal.cl.b.(Unknown Source)
at com.aspose.note.internal.aY.d.(Unknown Source)
at com.aspose.note.internal.aV.l.(Unknown Source)
at com.aspose.note.internal.aV.X.(Unknown Source)
at com.aspose.note.internal.bs.(Unknown Source)
at com.aspose.note.internal.bs.(Unknown Source)
at com.aspose.note.internal.it.(Unknown Source)
at com.aspose.note.Page.(Unknown Source)
at com.aspose.note.bP.a(Unknown Source)
at com.aspose.note.bP.c(Unknown Source)
at com.aspose.note.bV.a(Unknown Source)
at com.aspose.note.bV.c(Unknown Source)
at com.aspose.note.j.d(Unknown Source)
at com.aspose.note.j.b(Unknown Source)
at com.aspose.note.j.c(Unknown Source)
at com.aspose.note.m.a(Unknown Source)
at com.aspose.note.Document.a(Unknown Source)
at com.aspose.note.Document.(Unknown Source)
at com.aspose.note.Document.(Unknown Source)
at com.alphasense.sharepoint.sync.aspose.OneNoteProcessor.convertDotOneFileAndSentToAS(OneNoteProcessor.java:79)

@satyam2893,

The issue seems related to fonts installed on the corresponding server. Could you please try the same with Aspose.Note for Java 18.5 API on the said server and let us know if it helps resolve issue? Please share your sample OneNote file with us in case the issue still persists.

I tried with Aspose.Note for Java 18.5 API ,still same issue persist. Let me know the possible cause that would be helpful to me.

[2018-07-04 07:01:25,300] ERROR [] [] [] [http-nio-9000-exec-5] [DirectJDKLog.java:181] - Servlet.service() for servlet [dispatcherServlet] in context with path [/sharepoint] threw exception [Handler dispatch failed; nested exception is java.lang.ExceptionInInitializerError] with root cause
java.lang.NullPointerException: null
at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264)
at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:219)
at sun.awt.FontConfiguration.init(FontConfiguration.java:107)
at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:774)
at sun.font.SunFontManager$2.run(SunFontManager.java:431)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.SunFontManager.(SunFontManager.java:376)
at sun.awt.FcFontManager.(FcFontManager.java:35)
at sun.awt.X11FontManager.(X11FontManager.java:57)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
at sun.java2d.SunGraphicsEnvironment.getFontManagerForSGE(SunGraphicsEnvironment.java:201)
at sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphicsEnvironment.java:235)
at sun.java2d.HeadlessGraphicsEnvironment.getAvailableFontFamilyNames(HeadlessGraphicsEnvironment.java:97)
at com.aspose.note.internal.cl.b.(Unknown Source)
at com.aspose.note.internal.aY.d.(Unknown Source)
at com.aspose.note.internal.aV.l.(Unknown Source)
at com.aspose.note.internal.aV.X.(Unknown Source)
at com.aspose.note.internal.bt.(Unknown Source)
at com.aspose.note.internal.bt.(Unknown Source)
at com.aspose.note.internal.iB.(Unknown Source)
at com.aspose.note.Page.(Unknown Source)
at com.aspose.note.bO.a(Unknown Source)
at com.aspose.note.bO.c(Unknown Source)
at com.aspose.note.bU.a(Unknown Source)
at com.aspose.note.bU.c(Unknown Source)
at com.aspose.note.j.d(Unknown Source)
at com.aspose.note.j.b(Unknown Source)
at com.aspose.note.j.c(Unknown Source)
at com.aspose.note.m.a(Unknown Source)
at com.aspose.note.Document.a(Unknown Source)
at com.aspose.note.Document.(Unknown Source)
at com.aspose.note.Document.(Unknown Source)
at com.alphasense.sharepoint.sync.aspose.OneNoteProcessor.convertDotOneFileAndSentToAS(OneNoteProcessor.java:83)

@satyam2893,

Could you please share the exact Ubuntu version with us for our reference? Also, can you check if necessary fonts are installed on the server at your end?

Sorry , It is deployed in Alpine (not Ubuntu)
the deployed details:

maven:3.5.2
jdk 1.8
alpine:3.7 (OS)

I tried tested with aspose-word (18.1) , it worked fine in above mention environment but aspose note keep throwing exception at initialization.

@satyam2893,

Could you please find the fonts details information on the mentioned server and share with us? You can get an idea about this from here. Also, we want to establish test environment at our end for Alpine OS and need little guidance from you as which version should we go for preparing a VM from here. This will help us investigate the issue quickly.

There is no font in server(alpine OS). Adding font works for me.Thanks for your valuable support. If any issue occurs in future, will comment on this thread.

@satyam2893,

You are welcome. Please feel free to write to us in case of any query related to the API.