Windows Server の共有フォルダをストレージに設定している場合、war ファイルをデプロイして Resin を起動した際に、以下のエラーが出力され Resin の起動に失敗する場合があります。
英語表記の場合はエラーメッセージは「There are no more files」となります。
----
java.io.IOException: これ以上ファイルがありません。
at java.base/java.io.WinNTFileSystem.canonicalizeWithPrefix0(Native Method)
at java.base/java.io.WinNTFileSystem.canonicalizeWithPrefix(WinNTFileSystem.java:461)
at java.base/java.io.WinNTFileSystem.canonicalize(WinNTFileSystem.java:432)
at java.base/java.io.File.getCanonicalPath(File.java:618)
at jp.co.intra_mart.system.service.client.file.StorageLocalFileImpl.getCanonicalPath(StorageLocalFileImpl.java:481)
at jp.co.intra_mart.system.service.client.file.StorageLocalFileImpl.checkAccessable(StorageLocalFileImpl.java:394)
at jp.co.intra_mart.system.service.client.file.StorageLocalFileImpl.<init>(StorageLocalFileImpl.java:91)
at jp.co.intra_mart.system.service.client.file.StorageLocalFileImpl.<init>(StorageLocalFileImpl.java:102)
at jdk.internal.reflect.GeneratedConstructorAccessor45.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at jp.co.intra_mart.foundation.service.client.file.AbstractStorage.<init>(AbstractStorage.java:108)
at jp.co.intra_mart.foundation.service.client.file.SystemStorage.<init>(SystemStorage.java:40)
at jp.co.intra_mart.system.service.provider.SystemStorageFileUpdater.copySystemStorage(SystemStorageFileUpdater.java:48)
at jp.co.intra_mart.system.service.provider.SystemStorageFileUpdater.copySystemStorage(SystemStorageFileUpdater.java:57)
at jp.co.intra_mart.system.service.provider.SystemStorageFileUpdater.copySystemStorage(SystemStorageFileUpdater.java:57)
at jp.co.intra_mart.system.service.provider.SystemStorageFileUpdater.copySystemStorage(SystemStorageFileUpdater.java:57)
at jp.co.intra_mart.system.service.provider.SystemStorageFileUpdater.copySystemStorage(SystemStorageFileUpdater.java:57)
at jp.co.intra_mart.system.service.provider.SystemStorageFileUpdater.copySystemStorage(SystemStorageFileUpdater.java:57)
at jp.co.intra_mart.system.service.provider.SystemStorageFileUpdater.copySystemStorage(SystemStorageFileUpdater.java:57)
at jp.co.intra_mart.system.service.provider.SystemStorageFileUpdater.copySystemStorage(SystemStorageFileUpdater.java:57)
at jp.co.intra_mart.system.service.provider.SystemStorageFileUpdater.copySystemStorage(SystemStorageFileUpdater.java:57)
at jp.co.intra_mart.system.service.provider.SystemStorageFileUpdater.update(SystemStorageFileUpdater.java:33)
at jp.co.intra_mart.system.service.impl.ServiceControllerImpl.startCoordinator(ServiceControllerImpl.java:189)
at jp.co.intra_mart.system.service.impl.ServiceControllerImpl.accept(ServiceControllerImpl.java:664)
at jp.co.intra_mart.system.service.impl.ServiceControllerImpl.start(ServiceControllerImpl.java:126)
at jp.co.intra_mart.foundation.service.ServiceController.start(ServiceController.java:49)
at jp.co.intra_mart.system.servlet.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:125)
at com.caucho.server.webapp.WebApp.callInitializers(WebApp.java:3570)
at com.caucho.server.webapp.WebApp.startImpl(WebApp.java:3890)
at com.caucho.server.webapp.WebApp.access$700(WebApp.java:209)
at com.caucho.server.webapp.WebApp$StartupTask.run(WebApp.java:5476)
at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173)
at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118)
----
【発生条件】
Windows Server の共有フォルダをストレージに設定している場合に発生することがあります。
【原因】
OS から「ERROR_NO_MORE_FILES」のエラー ID が返却された際に、JDK で例外として処理されるため。
こちらは JDK の以下のバグに起因している可能性が考えられます。
https://bugs.openjdk.java.net/browse/JDK-8234363 (英語)
【回避方法】
現状では以下の方法でこの事象を回避できることが確認されました。
1. Resin 配下に展開された以下のディレクトリに含まれるすべてのフォルダをコピーします。
コピー元:WEB-INF/storage/system 配下
2. 以下のディレクトリへ前項でコピーしたフォルダをペーストします。
コピー先:{システムストレージディレクトリ}/storage 配下
例:ストレージルートパスが X://storage/imart でシステムストレージディレクトリ名が system の場合、X://storage/imart/system/storage
※コピー先のシステムストレージディレクトリは設定により異なりますので、お使いの環境の設定をご確認ください。
設定ファイルリファレンス - ストレージ設定ファイル
https://www.intra-mart.jp/document/library/iap/public/configuration/im_configuration_reference/texts/im_core/storage-config/index.html#システムストレージディレクトリ名設定
【関連要件】
この事象は「2020 Summer (8.0.26)」で改善されています。
要件 [31955] Windows Server の共有フォルダをストレージに設定した場合に Accel Platform の起動が失敗する場合があります。
https://issue.intra-mart.jp/issues/31955
-- 対象 -------------------------------------------------------------------------
iAP/Accel Platform/全アップデート
--------------------------------------------------------------------------------
FAQID:1029
Windows Server の共有フォルダをストレージに設定している場合、Resin の起動に失敗することがあります。
