Jira Server 8.0 or later fails with library not loaded error when starting up on MacOS
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
When starting Jira Software/Core 8.0 or Jira Service Management 4.0 later with AdoptOpenJDK 8 on MacOS for development or evaluation purposes, start up fails with the following error in the atlassian-jira.log -
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2019-04-05 10:59:09,665 Jira-Bootstrap ERROR [c.a.jira.startup.ComponentContainerLauncher] An Error occurred during ComponentContainerLauncher servlet context initialisation - /<path to adoptopenjdk>/jre/lib/libfontmanager.dylib: dlopen(/<path to adoptopenjdk>/jdk8u192-b12/Contents/Home/jre/lib/libfontmanager.dylib, 1): Library not loaded: @rpath/libfreetype.6.dylib
Referenced from: /<path to adoptopenjdk>/jdk8u192-b12/Contents/Home/jre/lib/libfontmanager.dylib
Reason: image not found.
java.lang.UnsatisfiedLinkError: /<path to adoptopenjdk>/jdk8u192-b12/Contents/Home/jre/lib/libfontmanager.dylib: dlopen(/<path to adoptopenjdk>/jdk8u192-b12/Contents/Home/jre/lib/libfontmanager.dylib, 1): Library not loaded: @rpath/libfreetype.6.dylib
Referenced from: /<path to adoptopenjdk>/jdk8u192-b12/Contents/Home/jre/lib/libfontmanager.dylib
Reason: image not found
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1845)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at sun.lwawt.macosx.LWCToolkit$1.run(LWCToolkit.java:93)
at sun.lwawt.macosx.LWCToolkit$1.run(LWCToolkit.java:80)
at java.security.AccessController.doPrivileged(Native Method)
at sun.lwawt.macosx.LWCToolkit.<clinit>(LWCToolkit.java:79)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.awt.Toolkit$2.run(Toolkit.java:860)
at java.awt.Toolkit$2.run(Toolkit.java:855)
at java.security.AccessController.doPrivileged(Native Method)
You would also see on the browser that it will got o https://<yourURL>/secure/errors.jsp

Cause
There is a known issue where AdoptOpenJDK 8 has a broken dependency on libfreetype.6.dylib
in its libfontmanager.dylib
. Read more about the issue here: https://github.com/AdoptOpenJDK/openjdk-build/issues/202
Workaround
As a workaround you can copy libfreetype.dylib.6
as libfreetype.6.dylib
and then change the install name of libfreetype.6.dylib
, using the following commands.
1
2
$ cp <path to adoptopenjdk>/jdk8u192-b12/Contents/Home/jre/lib/libfreetype.dylib.6 <path to adoptopenjdk>/jdk8u192-b12/Contents/Home/jre/lib/libfreetype.6.dylib
$ install_name_tool -id @rpath/libfreetype.6.dylib <path to adoptopenjdk>/jdk8u192-b12/Contents/Home/jre/lib/libfreetype.6.dylib
Was this helpful?