Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Fri Jun 24, 2022 1:02 pm

We are using the following spire.xls for java version:

<dependency>
<groupId>e-iceblue</groupId>
<artifactId>spire.xls</artifactId>
<version>5.5.0</version>
</dependency>

and using openjdk:17-alpine to build our docker image. When we run codes to convert excel file to PDF, we encountered the following exception. Looks we are missing certain libraries in our docker image. Can you advise what libraries we are missing or what is the best way to resolve the issue?

Here is the exception details:

[ ERROR] [2022-06-23 19:38:12] org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet] [175] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.UnsatisfiedLinkError: /opt/openjdk-17/lib/libfontmanager.so: Error loading shared library libfreetype.so.6: No such file or directory (needed by /opt/openjdk-17/lib/libfontmanager.so)] with root cause
java.lang.UnsatisfiedLinkError: /opt/openjdk-17/lib/libfontmanager.so: Error loading shared library libfreetype.so.6: No such file or directory (needed by /opt/openjdk-17/lib/libfontmanager.so)
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:383)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:227)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:169)
at java.base/jdk.internal.loader.NativeLibraries.findFromPaths(NativeLibraries.java:310)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:280)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2392)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:808)
at java.base/java.lang.System.loadLibrary(System.java:1893)
at java.desktop/sun.font.FontManagerNativeLibrary$1.run(FontManagerNativeLibrary.java:57)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
at java.desktop/sun.font.FontManagerNativeLibrary.<clinit>(FontManagerNativeLibrary.java:32)
at java.desktop/sun.font.SunFontManager$1.run(SunFontManager.java:270)

ledgerrunpeterzhou
 
Posts: 1
Joined: Wed Jun 22, 2022 12:49 am

Mon Jun 27, 2022 9:49 am

Hello,

Thanks for your inquiry.

From the error message I can't find anything directly related to our product. So at the moment, it is difficult to know the specific cause of this problem.
But I noticed that the version of Spire.Xls For Java which you are using is not the latest version. So I suggest you first try to upgrade to the latest version (12.6.0) and test again. If the problem persists, please provide your dockerfile so we can reproduce the problem. Thanks in advance.
Sincerely,
Andy
E-iceblue support team
User avatar

Andy.Zhou
 
Posts: 483
Joined: Mon Mar 29, 2021 3:03 am

Return to Spire.XLS