Unable to add Table of Contents or Page Tree macro in a Confluence Datacenter

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。

このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

要約

Users are not able to add a Table of Contents Macro or a Page Tree Macro in a Confluence page

環境

Confluence 8.5

診断

In the catalina.out  log files, the following errors can be observed: 

Exception in thread "http-nio-8090-exec-14" java.lang.InternalError: java.lang.reflect.InvocationTargetException
	at java.desktop/sun.font.FontManagerFactory$1.run(FontManagerFactory.java:87)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
	at java.desktop/sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:75)
	at java.desktop/sun.font.SunFontManager.getInstance(SunFontManager.java:248)
	at java.desktop/sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:266)
	at java.desktop/sun.java2d.SunGraphics2D.getFontMetrics(SunGraphics2D.java:871)
	at com.atlassian.confluence.tinymceplugin.placeholder.DefaultPlaceholderImageFactory.getFontMetrics(DefaultPlaceholderImageFactory.java:215)
	at com.atlassian.confluence.tinymceplugin.placeholder.DefaultPlaceholderImageFactory.getPlaceholderImage(DefaultPlaceholderImageFactory.java:60)
	at com.atlassian.confluence.tinymceplugin.placeholder.DefaultPlaceholderImageFactory.getPlaceholderImage(DefaultPlaceholderImageFactory.java:54)
	at com.atlassian.confluence.tinymceplugin.placeholder.MacroPlaceholderServlet.getPlaceholderImage(MacroPlaceholderServlet.java:117)
	at com.atlassian.confluence.tinymceplugin.placeholder.MacroPlaceholderServlet.doGet(MacroPlaceholderServlet.java:95)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:529)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:623)

. . . 

Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
	at java.desktop/sun.font.FontManagerFactory$1.run(FontManagerFactory.java:85)
	... 375 more
Caused by: java.lang.NullPointerException: Cannot load from short array because "sun.awt.FontConfiguration.head" is null
	at java.desktop/sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264)
	at java.desktop/sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:224)
	at java.desktop/sun.awt.FontConfiguration.init(FontConfiguration.java:106)
	at java.desktop/sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:706)
	at java.desktop/sun.font.SunFontManager$2.run(SunFontManager.java:358)
	at java.desktop/sun.font.SunFontManager$2.run(SunFontManager.java:315)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
	at java.desktop/sun.font.SunFontManager.<init>(SunFontManager.java:315)
	at java.desktop/sun.awt.FcFontManager.<init>(FcFontManager.java:35)
	at java.desktop/sun.awt.X11FontManager.<init>(X11FontManager.java:56)


原因

Atlassian installer has a script which will attempt to install the required font configuration package in the most common Linux distributions, however if your Linux distribution is not covered by our script, and does not include a suitable font configuration package, you will need to install one manually. 

ソリューション

To tackle this problem, a fontconfig (or an equivalent library) should be installed prior Confluence installation.  Refer to the documentation for your Linux distribution or preferred package manager for further information about how to do this.

Here are the commands to install font dependency in a number of common Linux distributions and package managers: 

Installing the below packages may need a restart of your Confluence instance

Ubuntu 

To install the fontconfig package on Ubuntu 18:

sudo apt install -y fontconfig

CentOS

CentOS 7 does not work with fontconfig . You can install dejavu-sans-fonts  as an alternative:

sudo yum install -y dejavu-sans-fonts

RHEL 

To install fontconfig on RedHat Enterprise Linux 7.5:

sudo yum install fontconfig
Later versions, including RHEL8, should also work similarly.

On RHEL 6, it might be necessary to install both the dejavu-sans-fonts  and the fontconfig  packages:

sudo yum install -y dejavu-sans-fonts

Debian 

To install the fontconfig package on Debian 9.5:

apt-get update && apt-get install -y fontconfig

Fedora

To install the fontconfig package on Fedora 28:

dnf install -y fontconfig




最終更新日 2024 年 7 月 19 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.