LoginSignup
1
1

More than 5 years have passed since last update.

IntelliJ IDEAからGAEのデプロイ時に発生するIllegalStateExceptionの回避方法

Posted at

Google App Engineのデプロイ時に以下のようなエラーが発生する場合があります。

'''java.lang.IllegalStateException: Found a jar file too large to upload: "..Local\Temp\appcfg1234567890.tmp\WEB-INF\lib\appengine-tools-sdk-1.7.x.jar". Consider using --enable_jar_splitting.
Unable to update app: Found a jar file too large to upload: "..Local\Temp\appcfg1234567890.tmp\WEB-INF\lib\appengine-tools-sdk-1.7.x.jar". Consider using --enable_jar_splitting.
Please see the logs [..\Local\Temp\appcfg1234567890.log] for further information.
'''
これはlibフォルダに配置したjarファイル等のサイズが1Mを超えたときにサイズオーバーで発生するエラーです。
ログに書いてありますがdeployコマンド発行時に"--enable_jar_splitting"というオプションをつけることで回避できます。

IntelliJ IDEAのGoogle App Engine Pluginではこのオプションを指定することができないため手動でデプロイの設定を行います。

メニューのPreferences > External Tools
+ボタンをクリックして新規登録

'Name:Deploy(任意)
Group:Google App Engine(任意)
Description:Deploy to Google App Engine(任意)
OptionとShow Inのチェックはデフォルトのまま
Program:/Applications/appengine-java-sdk-1.7.4/bin/appcfg.sh(macの場合の例)
Paramaters:--enable_jar_splitting update $ProjectFileDir$/out/artifacts/$ProjectName$exploded(ここでオプションを指定)
Working directory:/Applications/appengine-java-sdk-1.7.4/bin
'

Paramatersの所に以下のように指定します。
'--enable_jar_splitting update [ビルドの出力先]'

1
1
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
1
1