Deploy on App Engine, too many files problem

50 views
Skip to first unread message

ale

unread,
Jun 23, 2011, 9:22:59 AM6/23/11
to google-we...@googlegroups.com
Hi everybody,
I'm developing  a web app with GWT and App engine, and I have the problem of having more than 3000 files, so the deploy on app engine fail.
I have about 3800 files (I had add a lang, so the number of file grow a lot, from 2700 to 3800).

I take a look to my war folder, and I see that I have more than 2000 filse on WEB-INF/classes/.../client/

My question: the server really need this classes? Can I exclude from my war folder before upload?
There is a simple way to do this?

Any other suggestion is welcome...

Thank you
Alessandro

Ashwin Desikan

unread,
Jun 23, 2011, 9:33:51 AM6/23/11
to google-we...@googlegroups.com
Ale,

zip/ jar the additional files which would be used by your application at runtime. You can also look at zip/ jar images etc, this would considerably reduce the number of files.

Thanks
Ashwin

Kevin Anderson

unread,
Jun 23, 2011, 10:47:25 AM6/23/11
to google-we...@googlegroups.com
Your deployed application does not need any code that is strictly client. Meaning if your server side code does not reference a Widget (which is not likely) than it can be excluded from the classes folder. Typically any code in the client subfolder is not needed.

[I am however amazed that under your client folder you have over 2000 files??? Not my place to say, but I would look at why there is class explosion. Sounds like a maintenance nightmare.]

As for how, what are you using to build the war? Maven, Ant, etc. What ever you are using look at their documentation on how to exclude folders from the compile phase of the build process.

Jeff Larsen

unread,
Jun 23, 2011, 10:50:37 AM6/23/11
to google-we...@googlegroups.com

[I am however amazed that under your client folder you have over 2000 files??? Not my place to say, but I would look at why there is class explosion. Sounds like a maintenance nightmare.]

2000 class files wouldn't be that hard to hit when you think about anon subclasses

class SomeClass extends Composite{
 
  Button b = new Button();

   public SomeClass(){
       b.addClickHandler(new ClickHandler(){...});
       b.addFocusHandler(new FocusHandler(){...});
   } 

would be 3 .class files. 

Jeff Larsen

unread,
Jun 23, 2011, 10:52:31 AM6/23/11
to google-we...@googlegroups.com
Actually, immediately after I posted that, I'm not sure that is true. If you made the click/focus handlers subclasses of SomeClass it would be separate class files. 

ale

unread,
Jun 23, 2011, 11:13:26 AM6/23/11
to google-we...@googlegroups.com
Thank you Kevin,
I'm glad my suspicions were correct
I use the eclipse plugin to deploy e make everything, it is very very convenient, and so I became lazy...
my dream (today) is a simple option on the eclipse plugin to exclude some classes ;-)

However, I will try to create an ant file, that
is a work in my todo list for a long time...

...anyone have some example?

I have a lot of classes, but most are anonymous classes.
For example my main classes (my EntryPoint) is one java file, with 47 .class file


MyEntryPoint.
java ->   MyEntryPoint.class, MyEntryPoint$1.class...MyEntryPoint$46.class

Overall I have 261 java source file and 2061 classes. :-o

( However my app does many things ;-)  http://www.youtrail.com/ )

Thanks again!

Alessandro

ale

unread,
Jun 23, 2011, 11:15:40 AM6/23/11
to google-we...@googlegroups.com
It is exact!
every anonymous class became a single .class file with $n in the name 

In your example
SomeClass.class
SomeClass$1.class
SomeClass$2.class

Thankyou

Alessandro

ale

unread,
Jun 24, 2011, 3:42:05 AM6/24/11
to google-we...@googlegroups.com
Yes, this is a good idea.
I'm thinking to put static resource directly on an different server... (it is also more simple to change without deploy everything..)

Thank you,
Alessandro


Reply all
Reply to author
Forward
0 new messages