EcrossReferenceAdapter ClassCastException [message #482752] |
Thu, 27 August 2009 19:22 |
Travis London Messages: 14 Registered: July 2009 |
Junior Member |
|
|
Hello,
I am hitting a ClassCastException (CCE) at line 613 of
ECrossReferenceAdapter.java. I searched the eclipse newsgroups and found
one entry related but did not understand how it was resolved. I am using
EMF version 2.4.2, with GMF 1.1.3. The CCE is occuring due to an unset
notification from my domain model, where the unset is for a reference with
an upper bound of many (*). The call to unset is generated, and not
modified. It results in calling EObjectEList.unset(), which in turn calls
owner.eNotify(createNotification(Notification.UNSET, oldIsSet, false));
The ECrossReferenceAdapter class is trying to cast the notification's old
value to an EObject, which is failing because it is an instance of Boolean.
Any help would be greatly appreciated.
Thanks in advance,
Travis London
|
|
|
Re: EcrossReferenceAdapter ClassCastException [message #482762 is a reply to message #482752] |
Thu, 27 August 2009 20:21 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
Travis,
It sounds like a bug (and oversight). I recall a similar bug coming up
in the ChangeRecorder; you can look at how it handles this case..
Please open a bugzilla. I'll try to get a patch into it as soon as
possible. I'm not sure what to suggest for such an old version, other
than applying the patch yourself to the older source...
Travis London wrote:
> Hello,
>
> I am hitting a ClassCastException (CCE) at line 613 of
> ECrossReferenceAdapter.java. I searched the eclipse newsgroups and
> found one entry related but did not understand how it was resolved. I
> am using EMF version 2.4.2, with GMF 1.1.3. The CCE is occuring due
> to an unset notification from my domain model, where the unset is for
> a reference with an upper bound of many (*). The call to unset is
> generated, and not modified. It results in calling
> EObjectEList.unset(), which in turn calls
> owner.eNotify(createNotification(Notification.UNSET, oldIsSet, false));
>
> The ECrossReferenceAdapter class is trying to cast the notification's
> old value to an EObject, which is failing because it is an instance of
> Boolean.
>
> Any help would be greatly appreciated.
>
> Thanks in advance,
> Travis London
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
Re: EcrossReferenceAdapter ClassCastException [message #482839 is a reply to message #482783] |
Fri, 28 August 2009 10:15 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
Travis,
I'll need to apply this patch for 2.6.
You'd better open a separate bugzilla for GMF.
Travis London wrote:
> That patch worked for me. Is this fix in a newer version? Or is it
> something you will have to add?
>
> Also it turns out the GMF CrossReferenceAdapter class has the same
> problem. I will bring it up on their news group.
>
> Thanks, again.
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02661 seconds