View Full Version : Facing Problem with BeanModelLookup
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 ?
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
10 Aug 2009, 10:39 PM
Its working after removing unnecessary BeanModelTag implements.
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....
Powered by vBulletin® Version 4.1.5 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.