legacy-knowledge-base
公開されました Jul. 2, 2025

共有ネットワーク ドライブ上のディレクトリの OSGi .config ファイルに絶対パスを設定する方法

written-by

Isaac Wilson

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • 共有ネットワークドライブでドキュメントライブラリディレクトリ「External_Library」を使用しようとしていますが、相対パスの代わりに絶対パスを使用する方法を決定できません。起動時に相対パスが使用され、 Liferay Home 内に完全なディレクトリ構造が作成されます。
  • Liferay バンドルは Windows 環境 (Ubuntu を使用するサーバー上のネットワーク ドライブ) でホストされており、高度なファイル システム ストアを使用したいと考えています。

Environment

  • DXP 7.0
  • DXP 7.1
  • DXP 7.2

解決策

  • ディレクトリの絶対パスを設定する場合、 Universal Naming Conventionに従って、パスの先頭に二重スラッシュを使用して、別のホスト/サーバー上のパスを指定する必要があります。
  • そのため、Advanced File SystemStore構成にOSGi.configファイルを使用するプロセス(共有ドライブの絶対パスに適切な構文を使用)は、 com.liferay.portal.storeという名前のファイルを作成することです。 .file.system.configuration.AdvancedFileSystemStoreConfiguration.config
    [Liferay_Home]\osgi\configs内に配置され、次のコンテンツが含まれています:
rootDir="//server-name/directory/path/External_Library"

追加情報

  • 使用しているオペレーティング システムによっては、パスに含まれるスラッシュに若干の構文変更を加える必要がある場合があります。 たとえば、Windows パスでスラッシュの代わりにバックスラッシュを使用する場合、OS は二重のバックスラッシュを単一のバックスラッシュとして解釈します (したがって、パス \\server-name\server-name と解釈されます)。 -- 外部サーバー/ホストの代わりに、現在のホストのルート ディレクトリにある「server-name」というフォルダーを指している)。
  • これを念頭に置いて、Windows 環境では、次の構成が上記の例の有効な構文になります。
    rootDir="\\\\server-name\\directory\\path\\External_Library" 
  • .config ファイルと Advanced File System Store の詳細については、次の場所を参照してください。
did-this-article-resolve-your-issue

legacy-knowledge-base