I am trying to use our Swing application under Projector (https://blog.jetbrains.com/blog/2021/03/11/projector-is-out/), however Aspose Slides is throwing the following exception. I have lodged a bug with the Projector team (https://youtrack.jetbrains.com/issue/PRJ-465), but can the Aspose DEV team provide some clues as to what could be the problem here please? The Projector developer has specifically asked:
Unfortunately, it doesn’t help. I need to know which method of AWT is called and with which parameters, just before the library tells “Unable to find any font for: GenericFontFamilies.Serif”.
It would be extremely valuable if Aspose Slides can be used in this environment. Can the Aspose developers please provide this information? Thanks.
java.lang.ExceptionInInitializerError: null
at com.aspose.slides.internal.m4.do.do(Unknown Source) ~[aspose-slides-21.2-jdk16.jar:21.2]
at com.aspose.slides.internal.fq.new.do(Unknown Source) ~[aspose-slides-21.2-jdk16.jar:21.2]
at com.aspose.slides.internal.fq.new.do(Unknown Source) ~[aspose-slides-21.2-jdk16.jar:21.2]
at com.aspose.slides.internal.fq.new.do(Unknown Source) ~[aspose-slides-21.2-jdk16.jar:21.2]
at com.aspose.slides.internal.on.implements.do(Unknown Source) ~[aspose-slides-21.2-jdk16.jar:21.2]
at com.aspose.slides.internal.oq.final.do(Unknown Source) ~[aspose-slides-21.2-jdk16.jar:21.2]
at com.aspose.slides.internal.oq.final.do(Unknown Source) ~[aspose-slides-21.2-jdk16.jar:21.2]
at com.aspose.slides.internal.oq.final.do(Unknown Source) ~[aspose-slides-21.2-jdk16.jar:21.2]
at com.aspose.slides.FontsLoader.do(Unknown Source) ~[aspose-slides-21.2-jdk16.jar:21.2]
at com.aspose.slides.FontsLoader.loadExternalFonts(Unknown Source) ~[aspose-slides-21.2-jdk16.jar:21.2]
...
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.jetbrains.projector.server.ProjectorLauncher.main(ProjectorLauncher.kt:44) [projector-server-1.0-SNAPSHOT.jar:?]
Caused by: com.aspose.slides.exceptions.ArgumentException: Unable to find any font for: GenericFontFamilies.Serif
at com.aspose.slides.internal.hj.int.do(Unknown Source) ~[aspose-slides-21.2-jdk16.jar:21.2]
at com.aspose.slides.internal.fm.this.<clinit>(Unknown Source) ~[aspose-slides-21.2-jdk16.jar:21.2]
... 22 more
@nuix,
Thank you for your query. The exception can be related to the inaccessibility of the default folder with system fonts. Please check the issue with the latest version of Aspose.Slides. There were some fixes for fonts after 21.2. If the issue persists, please share a stack trace.
@nuix,
If the error persists with the latest version of Aspose.Slides, please check the issue with the special build for you: https://drive.google.com/file/d/1KROg5t08MJKg7WwSENgq19gfXoEbGqYQ/view?usp=sharing
Hi - I am afraid both 21.4 and the 12.5 preview fail in the same way. Any other ideas?
java.lang.ExceptionInInitializerError: null
at com.aspose.slides.internal.ng.do.do(Unknown Source) ~[aspose-slides-pre-21.5-with-fix.jar:21.5]
at com.aspose.slides.internal.fq.new.do(Unknown Source) ~[aspose-slides-pre-21.5-with-fix.jar:21.5]
at com.aspose.slides.internal.fq.new.do(Unknown Source) ~[aspose-slides-pre-21.5-with-fix.jar:21.5]
at com.aspose.slides.internal.fq.new.do(Unknown Source) ~[aspose-slides-pre-21.5-with-fix.jar:21.5]
at com.aspose.slides.internal.oz.implements.do(Unknown Source) ~[aspose-slides-pre-21.5-with-fix.jar:21.5]
at com.aspose.slides.internal.o3.short.do(Unknown Source) ~[aspose-slides-pre-21.5-with-fix.jar:21.5]
at com.aspose.slides.internal.o3.short.do(Unknown Source) ~[aspose-slides-pre-21.5-with-fix.jar:21.5]
at com.aspose.slides.internal.o3.short.do(Unknown Source) ~[aspose-slides-pre-21.5-with-fix.jar:21.5]
at com.aspose.slides.FontsLoader.do(Unknown Source) ~[aspose-slides-pre-21.5-with-fix.jar:21.5]
at com.aspose.slides.FontsLoader.loadExternalFonts(Unknown Source) ~[aspose-slides-pre-21.5-with-fix.jar:21.5]
...
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.jetbrains.projector.server.ProjectorLauncher.main(ProjectorLauncher.kt:44) [projector-server-1.0-SNAPSHOT.jar:?]
Caused by: com.aspose.slides.exceptions.ArgumentException: Unable to find any font for: GenericFontFamilies.SansSerif
at com.aspose.slides.internal.ht.int.do(Unknown Source) ~[aspose-slides-pre-21.5-with-fix.jar:21.5]
at com.aspose.slides.internal.fm.this.<clinit>(Unknown Source) ~[aspose-slides-pre-21.5-with-fix.jar:21.5]
... 22 more
I don’t have a small sample program as this is a part of a much larger program. However if you have a small Swing GUI program (any will do), run it using Projector and ensure it calls com.aspose.slides.FontsLoader.loadExternalFonts() on Linux - that should be enough to reproduce the problem.
@nuix,
Our development team still has not managed to reproduce the error. We prepared another special release for you. Please check the issue on your side: https://drive.google.com/file/d/1P4_HWCvA_AVdYIUImx12a9moYDc2MgyA/view?usp=sharing