intra-mart IM-FormaDesigner / IM-BIS トラブルシューティング 第8版 2017-12-01

4.6. サーバが起動しない


4.6.1. Web Application Server 起動時にSQLExceptionが発生する

対象バージョン

  • IM-FormaDesigner Version 7.2 の場合

    • IM-FormaDesigner Version 7.2.0 ~ 最新バージョン
  • IM-FormaDesigner for Accel Platform の場合

    • IM-FormaDesigner for Accel Platform 2012 Autumn (8.0.1) ~ 最新バージョン

現象

Web Application Server を起動する際、SQLExceptionが発生し、 Web Application Server が正常に起動しません。

条件

wkhtmltopdf によるPDF出力処理が終了する前に、 Web Application Server を停止する。

Resin の場合、下記のようなエラーが出力される。

{main} Removal of old temp file 'temp_file' failed. Please check permissions.
com.caucho.config.ConfigRuntimeException: java.sql.SQLException: CREATE for path 'temp_file' failed, because the file already exists.  CREATE can not override an existing table.
        at com.caucho.config.ConfigException.create(ConfigException.java:168)
        at com.caucho.server.resin.Resin.configure(Resin.java:1006)
        at com.caucho.server.resin.Resin.initMain(Resin.java:984)
        at com.caucho.server.resin.Resin.main(Resin.java:1442)
Caused by: java.sql.SQLException: CREATE for path 'temp_file' failed, because the file already exists.  CREATE can not override an existing table.
        at com.caucho.db.block.BlockReadWrite.create(BlockReadWrite.java:118)
        at com.caucho.db.block.BlockStore.create(BlockStore.java:471)
        at com.caucho.server.httpcache.TempFileManager.<init>(TempFileManager.java:79)
        at com.caucho.server.httpcache.TempFileService.createAndAddService(TempFileService.java:59)
        at com.caucho.server.resin.ResinDelegate.addServices(ResinDelegate.java:222)
        at com.caucho.server.resin.ProResinDelegate.addServices(ProResinDelegate.java:567)
        at com.caucho.server.resin.Resin.initServletSystem(Resin.java:1296)
        at com.caucho.server.resin.Resin.configure(Resin.java:1002)
        ... 2 more
java.sql.SQLException: CREATE for path 'temp_file' failed, because the file already exists.  CREATE can not override an existing table.
{main} com.caucho.config.ConfigRuntimeException: java.sql.SQLException: CREATE for path 'temp_file' failed, because the file already exists.  CREATE can not override an existing table.
                        at com.caucho.config.ConfigException.create(ConfigException.java:168)
                        at com.caucho.server.resin.Resin.configure(Resin.java:1006)
                        at com.caucho.server.resin.Resin.initMain(Resin.java:984)
                        at com.caucho.server.resin.Resin.main(Resin.java:1442)
                       Caused by: java.sql.SQLException: CREATE for path 'temp_file' failed, because the file already exists.  CREATE can not override an existing table.
                        at com.caucho.db.block.BlockReadWrite.create(BlockReadWrite.java:118)
                        at com.caucho.db.block.BlockStore.create(BlockStore.java:471)
                        at com.caucho.server.httpcache.TempFileManager.<init>(TempFileManager.java:79)
                        at com.caucho.server.httpcache.TempFileService.createAndAddService(TempFileService.java:59)
                        at com.caucho.server.resin.ResinDelegate.addServices(ResinDelegate.java:222)
                        at com.caucho.server.resin.ProResinDelegate.addServices(ProResinDelegate.java:567)
                        at com.caucho.server.resin.Resin.initServletSystem(Resin.java:1296)
                        at com.caucho.server.resin.Resin.configure(Resin.java:1002)
                        ... 2 more

以下のアプリケーション種別・BIS作成種類の場合に発生します。
  • アプリケーション種別「標準」
  • アプリケーション種別「IM-Workflow」
  • BIS作成種類「BISフロー」
  • BIS作成種類「ワークフロー」

原因

wkhtmltopdf によるPDF出力処理は、 Web Application Server の外部のアプリケーションによる処理として実行されます。
PDF出力処理が終了する前に Web Application Server を停止しようとすると、 wkhtmltopdf による処理が Web Application Server の一部のリソースを掴んだ状態で保持されます。
wkhtmltopdf が一部のリソースを掴んだままの状態であるため、 Web Application Server を起動するとエラーが発生します。

以下の要件で対応を行っています。

  • IM-FormaDesigner for Accel Platform の場合

    • 要件 #20849 PDF出力処理中にAPサーバを停止すると、APサーバが起動できなくなります。
    • 要件 #21965 PDF出力機能にタイムアウト時間を設定できるようにします。

コラム

要件 #20849 対応のバージョンを利用している場合でも、APサーバを強制的に停止した場合は、本記事の「現象」が発生します。 その場合は、wkhtmltopdf を停止させた後、 Web Application Server を再起動してください。

解決方法

wkhtmltopdf を停止させた後、 Web Application Server を再起動してください。

回避方法

ありません。

復旧方法

ありません。