gae:deploy throws a "Found a jar file too large to upload" with play-1.2-preview

127 views
Skip to first unread message

Nicolas GIRARDIN

unread,
Mar 14, 2011, 5:13:31 PM3/14/11
to play-fr...@googlegroups.com
Hi folks,

When deploying even a very simple gae+siena application, I got this nasty "Found a jar file too large to upload" exception.


gigi@gigi-laptop:~/Dev/workspace/com.ngirardin.siena$ export GAE_PATH=../../appengine-java-sdk-1.4.2/ && ../../play-1.2-preview/play gae:deploy
~        _            _ 
~  _ __ | | __ _ _  _| |
~ | '_ \| |/ _' | || |_|
~ |  __/|_|\____|\__ (_)
~ |_|            |__/   
~
~ play! 1.2-preview, http://www.playframework.org
~
~
~ Compiling
~ ---------
07:56:16,782 INFO  ~ Starting /home/gigi/Dev/workspace/com.ngirardin.siena
07:56:16,787 INFO  ~ Module gae is available (/home/gigi/Dev/workspace/com.ngirardin.siena/modules/gae-1.4)
07:56:16,787 INFO  ~ Module siena is available (/home/gigi/Dev/play-1.2-preview/modules/siena-1.5)
07:56:17,445 WARN  ~ 
07:56:17,445 WARN  ~ Google App Engine module
07:56:17,445 WARN  ~ ~~~~~~~~~~~~~~~~~~~~~~~
07:56:17,445 WARN  ~ No Google App Engine environment found. Setting up a development environement
07:56:17,456 WARN  ~ Don't forget to define your GAE application id in the 'war/WEB-INF/appengine-web.xml' file
07:56:17,456 WARN  ~ 
07:56:17,456 INFO  ~ Precompiling ...
07:56:21,295 INFO  ~ Done.
~
~ Packaging
~ ---------
~ Packaging current version of the framework and the application to /tmp/com.ngirardin.siena.war ...
~
~ Deploying
~ ---------
Reading application configuration data...
Mar 14, 2011 7:56:23 AM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed /tmp/com.ngirardin.siena.war/WEB-INF/appengine-web.xml
Mar 14, 2011 7:56:23 AM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed /tmp/com.ngirardin.siena.war/WEB-INF/web.xml
Mar 14, 2011 7:56:23 AM com.google.apphosting.utils.config.IndexesXmlReader readConfigXml
INFO: Successfully processed /tmp/com.ngirardin.siena.war/WEB-INF/appengine-generated/datastore-indexes-auto.xml
Beginning server interaction for ...
0% Creating staging directory
5% Scanning for jsp files.

java.lang.IllegalStateException: Found a jar file too large to upload: "/tmp/appcfg9102619212442960498.tmp/WEB-INF/application/modules/gae-1.4/lib/provided-appengine-local-runtime.jar".  Consider using --enable_jar_splitting.
Unable to update app: Found a jar file too large to upload: "/tmp/appcfg9102619212442960498.tmp/WEB-INF/application/modules/gae-1.4/lib/provided-appengine-local-runtime.jar".  Consider using --enable_jar_splitting.
Please see the logs [/tmp/appcfg7868472983192568528.log] for further information.
~ Done!

This issue is reproductible using the play-1.2-preview version and the simple siena project that I created to report the "private field" issue (http://groups.google.com/group/play-framework/browse_thread/thread/e94561f712c64649*). You can download it at the http://dl.free.fr/lVoqWbkWY address.

The tmp log attached recommands the usage of the --enable_jar_splitting switch wich leads to an "--enable_jar_splitting not recognized" error.


When trying to build the war with the "play war" command, I got a Python stack trace.

gigi@gigi-laptop:~/Dev/workspace/com.ngirardin.siena$ ../../play-1.2-preview/play war -o /tmp/war
~        _            _ 
~  _ __ | | __ _ _  _| |
~ | '_ \| |/ _' | || |_|
~ |  __/|_|\____|\__ (_)
~ |_|            |__/   
~
~ play! 1.2-preview, http://www.playframework.org
~
08:04:47,011 INFO  ~ Starting /home/gigi/Dev/workspace/com.ngirardin.siena
08:04:47,016 INFO  ~ Module gae is available (/home/gigi/Dev/workspace/com.ngirardin.siena/modules/gae-1.4)
08:04:47,017 INFO  ~ Module siena is available (/home/gigi/Dev/play-1.2-preview/modules/siena-1.5)
08:04:47,766 WARN  ~ 
08:04:47,766 WARN  ~ Google App Engine module
08:04:47,766 WARN  ~ ~~~~~~~~~~~~~~~~~~~~~~~
08:04:47,766 WARN  ~ No Google App Engine environment found. Setting up a development environement
08:04:47,781 WARN  ~ Don't forget to define your GAE application id in the 'war/WEB-INF/appengine-web.xml' file
08:04:47,781 WARN  ~ 
08:04:47,781 INFO  ~ Precompiling ...
08:04:52,073 INFO  ~ Done.

~ Packaging current version of the framework and the application to /tmp/war ...
Traceback (most recent call last):
  File "../../play-1.2-preview/play", line 136, in <module>
    cmdloader.commands[play_command].execute(command=play_command, app=play_app, args=remaining_args, env=play_env, cmdloader=cmdloader)
  File "/home/gigi/Dev/play-1.2-preview/framework/pym/play/commands/war.py", line 65, in execute
    package_as_war(app, env, war_path, war_zip_path, war_exclusion_list)
  File "/home/gigi/Dev/play-1.2-preview/framework/pym/play/utils.py", line 109, in package_as_war
    copy_directory(app.path, os.path.join(war_path, 'WEB-INF/application'), war_exclusion_list)
  File "/home/gigi/Dev/play-1.2-preview/framework/pym/play/utils.py", line 202, in copy_directory
    for exclusion in exclude:
TypeError: 'NoneType' object is not iterable

Maybe something changed between the 1.1 et 1.2-preview versions?

Any advice? :)

Thanks in advance,

Nicolas


play gae:deploy stacktrace.txt

Nicolas Girardin

unread,
Mar 15, 2011, 5:35:52 AM3/15/11
to play-fr...@googlegroups.com
The problem is still present with the last repo version.

Any help?

2011/3/14 Nicolas GIRARDIN <ngir...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/play-framework?hl=en.
>

Steve Chaloner

unread,
Mar 15, 2011, 5:47:50 AM3/15/11
to play-framework
Just a guess, but isn't provided-appengine-local-runtime.jar already
provided by GAE so you don't need to upload it?

I could be completely wrong on this - just guessing based on the name
of the jar!

- Steve

On Mar 15, 10:35 am, Nicolas Girardin <ngirar...@gmail.com> wrote:
> The problem is still present with the last repo version.
>
> Any help?
>
> 2011/3/14 Nicolas GIRARDIN <ngirar...@gmail.com>:
>
> > Hi folks,
>
> > When deploying even a very simple gae+siena application, I got this nasty
> > "Found a jar file too large to upload" exception.
>
> > gigi@gigi-laptop:~/Dev/workspace/com.ngirardin.siena$ export
> > GAE_PATH=../../appengine-java-sdk-1.4.2/ && ../../play-1.2-preview/play
> > gae:deploy
> > ~        _            _
> > ~  _ __ | | __ _ _  _| |
> > ~ | '_ \| |/ _' | || |_|
> > ~ |  __/|_|\____|\__ (_)
> > ~ |_|            |__/
> > ~
> > ~ play! 1.2-preview,http://www.playframework.org
> > (http://groups.google.com/group/play-framework/browse_thread/thread/e9...).
> > You can download it at thehttp://dl.free.fr/lVoqWbkWYaddress.
> > The tmp log attached recommands the usage of the --enable_jar_splitting
> > switch wich leads to an "--enable_jar_splitting not recognized" error.
>
> > When trying to build the war with the "play war" command, I got a Python
> > stack trace.
> > gigi@gigi-laptop:~/Dev/workspace/com.ngirardin.siena$
> > ../../play-1.2-preview/play war -o /tmp/war
> > ~        _            _
> > ~  _ __ | | __ _ _  _| |
> > ~ | '_ \| |/ _' | || |_|
> > ~ |  __/|_|\____|\__ (_)
> > ~ |_|            |__/
> > ~
> > ~ play! 1.2-preview,http://www.playframework.org

David Wursteisen

unread,
Mar 15, 2011, 6:00:54 AM3/15/11
to play-fr...@googlegroups.com
Have you try to use Ivy (new dependency management for play) for your application module ?

According to your path, gae module is located where your play app is. So, maybe play try to put the gae module into your war. And I don't think that gae libs have to be in the war. You may compare your war between play 1.1 and play 1.2 ? (or just move gae module out of your application and use the "old" way to configure this module, using Application.conf)

2011/3/15 Nicolas Girardin <ngir...@gmail.com>

Nicolas Girardin

unread,
Mar 15, 2011, 6:14:05 AM3/15/11
to play-fr...@googlegroups.com
Thanks for your quick response David,

I've removed my modules from the application.conf and put them in the
dependencies.yaml like this:

require:
- play
- play -> siena [1.5,)
- play -> gae [1.4,)
- org.jsoup -> jsoup [1.5.2,)
- joda-time -> joda-time [1.6.2,)

I've removed everything under the myapp/lib and myapp/modules folders,
and runned "play dependencies". All dependencies are downloaded and
I've got the following situation:

$ls myapp/lib
jsoup-1.5.2.jar

$ls myapp/modules/
gae-1.4 siena-1.5

and again, when doing a "play gae:deploy" always the same:
Java.lang.IllegalStateException: Found a jar file too large to upload:
"/tmp/appcfg2061634415147847640.tmp/WEB-INF/application/modules/gae-1.4/lib/provided-appengine-local-runtime.jar".
Consider using --enable_jar_splitting.

I'am doing the things right, adding modules in the dependencies.yaml?
Is there a reason that modules are downloaded in the
application/modules folder instead of play/modules?

Nicolas

2011/3/15 David Wursteisen <david.wu...@gmail.com>:

Nicolas Girardin

unread,
Mar 15, 2011, 6:22:39 AM3/15/11
to play-fr...@googlegroups.com
Sorry Steve, I didn't saw your answer!

I think you're alright, the myapp/modules/gae-1.4/libs is full of huge jar:

$ls myapp/modules/gae-1.4/lib$ ll -h
total 55M
4.0K ./
4.0K 2011-03-15 11:11 ../
13M appengine-api-1.0-sdk-1.4.0.jar
1.5M appengine-api-labs-1.4.0.jar
16K appengine-jsr107cache-1.4.0.jar
8.8M appengine-tools-api.jar
16K geronimo-jta_1.1_spec-1.1.1.jar
7.9K jsr107cache-1.1.jar
9.7K play-gae.jar
288K provided-appengine-agentimpl.jar
34K provided-appengine-agent.jar
79K provided-appengine-agentruntime.jar
13M provided-appengine-api.jar
1.5M provided-appengine-api-labs.jar
2.4M provided-appengine-api-stubs.jar
9.8M provided-appengine-local-runtime.jar
6.0M provided-appengine-testing.jar

I think they are need for the compilation, but "play war" and
"gae:deploy" should not pack them.

Am I alright?

Nicolas


2011/3/15 Nicolas Girardin <ngir...@gmail.com>:

David Wursteisen

unread,
Mar 15, 2011, 6:31:07 AM3/15/11
to play-fr...@googlegroups.com



Am I alright?

Nicolas

I think so.

Remove gae from dependencies.yml,
add it into your application.conf (delete gae directory located into your app)
try again, it may work...

but a good solution might to set gae dependency as "provided" but I don't see any reference to it in the temporary documentation
https://gist.github.com/784734


 

Nicolas Girardin

unread,
Mar 15, 2011, 9:08:58 AM3/15/11
to play-fr...@googlegroups.com

thanks David, your work around  worked as expected!

So what's the long term solution? I read this doc, but can't find the information that I need. Should we update it?

Could you give me more informations about the "provided" option?

Nicolas

On Mar 15, 2011 11:31 AM, "David Wursteisen" <david.wu...@gmail.com> wrote:

David Wursteisen

unread,
Mar 15, 2011, 9:37:54 AM3/15/11
to play-fr...@googlegroups.com
"provided" is a scope which exist in maven, so maybe something similar exist in ivy (I don't know ivy at all : it's the dependency engine which is used in play dependency management)

So, according to http://ant.apache.org/ivy/history/latest-milestone/ivyfile/dependency.html : with ivy, you have to define you dependency for the configuration "runtime" to get something similar to the maven "provided" scope. (ie : lib given by your application server at runtime).

It's seem that for now, play only used "default" configuration, (see https://github.com/playframework/play/blob/master/framework/src/play/deps/YamlParser.java#L92 ).

obviously, as I don't know ivy and how play managed dependencies, don't take what I'm saying as "the truth" ;)

2011/3/15 Nicolas Girardin <ngir...@gmail.com>

Nicolas Girardin

unread,
Mar 16, 2011, 3:01:33 PM3/16/11
to play-fr...@googlegroups.com
Thanks for your response David!

I assume that you know how Maven works pretty well, unfortunnaly I'm a
near-total noob on this subject... :(

I think that I'm not the only one trying to deploy an application to
GAE, and this bug could affect many people. Should somebody let me
know if I should open a ticket?


Nicolas


2011/3/15 David Wursteisen <david.wu...@gmail.com>:

David Wursteisen

unread,
Mar 17, 2011, 3:33:40 PM3/17/11
to play-fr...@googlegroups.com
I think that you can. (just to get a point of view of this feature)

2011/3/16 Nicolas Girardin <ngir...@gmail.com>
Reply all
Reply to author
Forward
Message has been deleted
0 new messages