Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » attribute not transient must have datatype serializable(attribute not transient must have datatype serializable)
attribute not transient must have datatype serializable [message #526069] Thu, 08 April 2010 15:46 Go to next message
kumarr  is currently offline kumarr Friend
Messages: 2
Registered: April 2010
Junior Member
Hi All,

I am creating an ECore model. I created an EClass and inside it I want to create a data member that is a list. So I created an EAttribute of type EEList.

However when I try to create the genmodel file I get an error saying

the attribute "XYZ.Attribute_name" is not transient o it must have a data type that is serializable.

It also gives a warning saying

The generic type associated with the 'EEList' classifier should have 1 type atrgument(s) to match the number of type parameter(s) of the classifier.

Can anyone tell me what I'm doing wrong? I could not figure out how to set the 'E' in EEList <E>.

Thanks.
Rajesh
Re: attribute not transient must have datatype serializable [message #526078 is a reply to message #526069] Thu, 08 April 2010 15:59 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Rajesh,

Comments below.

kumarr wrote:
> Hi All,
>
> I am creating an ECore model. I created an EClass and inside it I want
> to create a data member that is a list. So I created an EAttribute of
> type EEList.
>
> However when I try to create the genmodel file I get an error saying
> the attribute "XYZ.Attribute_name" is not transient o it must have a
> data type that is serializable.
> It also gives a warning saying
> The generic type associated with the 'EEList' classifier should have 1
> type atrgument(s) to match the number of type parameter(s) of the
> classifier.
>
> Can anyone tell me what I'm doing wrong? I could not figure out how to
> set the 'E' in EEList <E>.
It sounds far more likely that you should be defining an EAttribute with
upper bound -1 (unbounded) and using the EType to specify the item
type. That's the best way to define serialization support. Otherwise
you'll need to defined your own EDataType as well as specify how to
serialize it in the generated XyzFactoryImpl.
>
> Thanks. Rajesh


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: attribute not transient must have datatype serializable [message #526087 is a reply to message #526078] Thu, 08 April 2010 16:13 Go to previous message
kumarr  is currently offline kumarr Friend
Messages: 2
Registered: April 2010
Junior Member
Thanks! You're right. I didn't realize I could set the upper bound to -1. I have not used EMF in a long time.
Previous Topic:[Announce] Webinar on CDO - Apr. 29
Next Topic:serialization and document issues when OPTION_SAVE_DOCTYPE enabled
Goto Forum:
  


Current Time: Thu Apr 25 00:13:57 GMT 2024

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

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

Back to the top