PDA

View Full Version : Facing Problem with BeanModelLookup



rahulkumar_2002
1 Aug 2009, 5:26 AM
I am using EXT-GWT2.01 and GWT1.6

Getting follwing error

Errors in 'transient source for com.extjs.gxt.ui.client.data.BeanModelLookupImpl'
Line 9: The code of method getFactory(Class) is exceeding the 65535 bytes limit

From error its look like method getFactory(Class) of generated BeanModelLookupImpl
is exceeding 65K limit.

Any workaround for this ?

sven
1 Aug 2009, 6:02 AM
I guess you have many classes that implement the BeanModelTag interface. This is a java hard limit of the maxium method size. I changed the code a little bit to generate smaller code for that method. Will be in the next release.

You should check if you really need all that beans implementing BeanModelTag

rahulkumar_2002
10 Aug 2009, 10:39 PM
Its working after removing unnecessary BeanModelTag implements.
Thanks

Tirthankar
12 Aug 2009, 6:21 AM
If the factory method is getting loaded with too many lines to return appropriate object, then we can move out the object definition to be returned outside the class in an XML or any other file.

Hence the method can have some generic piece of code which return the object using reflection API and the type of object can be determined from external file. This way even if someone has too many BeanModelTag classes in their application the lines of code inside the getFactory class will always remain the same and only the external file where the class definition is put will keep growing....

Thanks,
Tirthankar