LoginSignup
5
7

More than 5 years have passed since last update.

intra-martのテナント環境セットアップ時にjava.sql.SQLExceptionが発生したときの対策

Last updated at Posted at 2016-06-21

前提

intra-martのテナント環境セットアップ時にエラーが発生し失敗した際の対策方法です。
以下の環境での情報となります。

app version
resin 4.0.48
intra-mart 8.0.11
Oracle 12c
Postgresql 9.5.3

エラー内容

セットアップ後、以下のようなエラーが発生します。

セットアップ結果.png

ログを確認すると以下のExceptionが発生しています。
ログの確認手順:インポートエラーの原因をログから追跡する

oracle
java.sql.SQLException: Schema changed
postgresql
org.postgresql.util.PSQLException: ERROR: cached plan must not change result type

対策

resin-web.xmlのprepared-statement-cache-sizeを「0」に設定することで、エラーを回避可能です。
テナント環境セットアップ処理中のみ「0」に設定し、その後はもとの値に戻すという作業が必要そうです。

resin-web.xmlの設定方法は以下となります。
プリペアドステートメントキャッシュ設定

後で気づいたのですが、以下のintra-martのドキュメントにて対応策が記載されていました。
Exceptionの内容でググっていて、ドキュメントになかなかたどりつけませんでした。
Resin で PreparedStatement の キャッシュサイズに大きな値を指定している場合にテナント環境セットアップが失敗する

5
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
7