Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Static initializer exceeding 65535 bytes("The code for the static initializer is exceeding the 65535 bytes limit")
Static initializer exceeding 65535 bytes [message #668462] Thu, 05 May 2011 18:50 Go to next message
Trev  is currently offline Trev Friend
Messages: 3
Registered: April 2011
Junior Member
When I generate model code from a schema with a very large
enumeration, the code fails to compile, with the error "The code
for the static initializer is exceeding the 65535 bytes limit".

Searching for this error message leads to recommendations about
setting the GenPackage's "Initialize by Loading" property to "true",
and setting its "Literals Interface" property to "false". But those
properties already have those recommended values. Has anyone else
encountered this?

Thanks,
Re: Static initializer exceeding 65535 bytes [message #668534 is a reply to message #668462] Fri, 06 May 2011 06:56 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Trev,

If the enumeration is so large it can't be represented in Java, you
could try ecore:enum="false". I've never seen an enum that large!


Trev wrote:
> When I generate model code from a schema with a very large
> enumeration, the code fails to compile, with the error "The code
> for the static initializer is exceeding the 65535 bytes limit".
>
> Searching for this error message leads to recommendations about
> setting the GenPackage's "Initialize by Loading" property to "true",
> and setting its "Literals Interface" property to "false". But those
> properties already have those recommended values. Has anyone else
> encountered this?
>
> Thanks,


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Static initializer exceeding 65535 bytes [message #668692 is a reply to message #668534] Fri, 06 May 2011 19:01 Go to previous message
Trev  is currently offline Trev Friend
Messages: 3
Registered: April 2011
Junior Member
Ed Merks wrote:
> If the enumeration is so large it can't be represented in Java, you
> could try ecore:enum="false". I've never seen an enum that large!

Thank you; the compile error goes away if I modify the schema by adding
'ecore:enum="false"'. Is there a way that I could do it without modifying
the schema, perhaps by doing something to the .ecore or .genmodel?

I am an EMF beginner, still at the "trying to do the tutorial but with my
own schema" stage.

Thanks,
Previous Topic:Dynamic EMF
Next Topic:Checking if model is opened in an editor (and opening if not)
Goto Forum:
  


Current Time: Fri Apr 19 01:54:25 GMT 2024

Powered by FUDForum. Page generated in 0.01422 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top