Confluence のバージョンアップ時の PDF ファイル・インストールについて
質問
バージョンアップ後に管理コンソールの「PDF エクスポート言語サポート」でフォントファイルをインストールした際に、
No font file could be found with the name (フォントファイル名)
というエラーメッセージが表示されてインストールできません。エラーメッセージのフォントファイル名にはインストールしようとしているフォントファイル名とは違うファイル名が表示されます。ログには以下の情報が出力されます。回避策はありますでしょうか。
2017-06-28 15:55:04,559 ERROR [main] [extra.flyingpdf.upgrade.UpgradePdfLanguageSupport] afterPropertiesSet Failed to make the font /var/install_test/confluence-3.2.1_01-std/home/fonts/ipaexg.ttf available for use in the PDF export plugin. Please install the font manually.
java.io.IOException: No font file could be found with the name ipagp.otf
at com.atlassian.confluence.extra.flyingpdf.config.FontsDirectoryFontDao.getFont(FontsDirectoryFontDao.java:25)
at com.atlassian.confluence.extra.flyingpdf.config.FontsDirectoryFontDao.removeFont(FontsDirectoryFontDao.java:55)
at com.atlassian.confluence.extra.flyingpdf.config.PdfExportFontManager.installFont(PdfExportFontManager.java:84)
at com.atlassian.confluence.extra.flyingpdf.upgrade.UpgradePdfLanguageSupport.afterPropertiesSet(UpgradePdfLanguageSupport.java:70)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1203)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
(以下省略)
回答
原因
アップデート前とは違うフォントファイルをインストールしようとすることで現象が発生します。
現象についての詳細は、Atlassian社 が公開している以下のドキュメントをご参照ください。
回避策
エラーメッセージに表示されたファイル名のフォントをインストールします。
また、以前に使っていたフォントファイルが手元にないときは、別のフォントファイルの名前を変更することでも代用可能です。
上記の方法で解消されない場合は、以下の手順でデータベースとファイルシステムの両方から、古いフォントファイルを削除していただく必要がございます。
データベースの直接操作となってしまいますので、バックアップをご取得いただき、検証環境等でお試しいただいてから実施いただきますようお願いいたします。
Confluence をシャットダウンします。
次の SQL クエリを実行します。
UPDATE bandana SET bandanavalue = '<map> <entry> <string>customfont</string> <string></string> </entry> </map>' WHERE bandanakey = 'com.atlassian.confluence.extra.flyingpdf.fontname';<confluence_home>/fontsフォルダー内のすべてを削除します。Confluence を再起動します。
フォントを再度アップロードしてインストールします。