1

is GWT CSSResources limits css file size should not be more than 65535 bytes. why so?

JAVAC
  • 1,230
  • 3
  • 17
  • 38
  • Never heard of that limit. Do you have an error message or similar to share, or do you have a pointer to where you saw it? – Joachim Isaksson Jan 16 '13 at 07:17
  • The error i got is in dev mode "Errors in 'generated://9E52AC796FA0FDB204B1ACE38008CB09/com/test/resources/my_default_InlineClientBundleGenerator.java Line:2400:The code of method getText() is exceeding the 65535 bytes limit" – JAVAC Jan 16 '13 at 08:56
  • 1
    Ah, [it's a Java limit of the generated class actually](http://stackoverflow.com/questions/5689798/why-does-java-limit-the-size-of-a-method-to-65535-byte). Sadly, no easy fix comes to mind. – Joachim Isaksson Jan 16 '13 at 09:07

1 Answers1

0

This is more of a Java limitation than GWT. From java perspective the work around is splitting up the methods.

However for GWT you just need to split up your Client Bundle contents into smaller chunks.

Ideally GWT should have handled this for you by chunking up the file you are using in Client bundle. But since this is a corner case i guess you might as well log a bug. Similar Bugs list in GWT.

Also, your immediate solution would be to use alternative

1) If the text contents can be split across multiple files. Do it!!!!

2) If text contents are changing and hence cannot be split , avoid using Client Bundle.

appbootup
  • 9,537
  • 3
  • 33
  • 65