Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [Xtend] Creation of associations (ClassCastException)([Xtend] Creation of associations (ClassCastException))
[Xtend] Creation of associations (ClassCastException) [message #658499] Tue, 08 March 2011 18:21 Go to next message
Peter Sasse is currently offline Peter SasseFriend
Messages: 5
Registered: March 2011
Junior Member
Hi,

I have problems with creating associations (below association between OneToOneArc and BatchJob). "BatchJob" is contained by an EClass named "BatchStream".

create mmBatch::OneToOneArc createJobOne2OneCond(mmBatch::BatchJob jobTarget, mmBatch::BatchJob jobSource) :
this.setPredecessor(jobSource) ->
this.setSuccessor(jobTarget) ->
this.setName(jobSource.name + "->" + jobTarget.name)
;

I am getting following error in my workflow during writing the xmi file by org.eclipse.mwe.emf.Writer:
1032 ERROR WorkflowRunner - java.lang.String incompatible with org.eclipse.emf.ecore.util.FeatureMap
java.lang.ClassCastException: java.lang.String incompatible with org.eclipse.emf.ecore.util.FeatureMap
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eURIFragmentSegm ent(BasicEObjectImpl.java:302)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.getURIFragm ent(ResourceImpl.java:678)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.getURIFragmen t(XMLResourceImpl.java:423)
at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.getURIFragment( XMLHelperImpl.java:718)
...

Do I have to implement associations in a different way (like cloning BatchJob parameters)? I really appreciate any kind of help.

Thank you,
Peter
Re: [Xtend] Creation of associations (ClassCastException) [message #658541 is a reply to message #658499] Tue, 08 March 2011 21:30 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31780
Registered: July 2009
Senior Member
Peter,

There's something odd going on with your model. There's a feature
that's being used as part of eContents(), it's an EAttribute so it must
be a feature map (to be a content feature), but its value is a String.
It's impossible to say how you'd get in this situation from what you've
explained so far.

Peter Sasse wrote:
> Hi,
>
> I have problems with creating associations (below association between
> OneToOneArc and BatchJob). "BatchJob" is contained by an EClass named
> "BatchStream".
> create mmBatch::OneToOneArc createJobOne2OneCond(mmBatch::BatchJob
> jobTarget, mmBatch::BatchJob jobSource) :
> this.setPredecessor(jobSource) ->
> this.setSuccessor(jobTarget) ->
> this.setName(jobSource.name + "->" + jobTarget.name)
> ;
>
> I am getting following error in my workflow during writing the xmi
> file by org.eclipse.mwe.emf.Writer:
> 1032 ERROR WorkflowRunner - java.lang.String incompatible with
> org.eclipse.emf.ecore.util.FeatureMap
> java.lang.ClassCastException: java.lang.String incompatible with
> org.eclipse.emf.ecore.util.FeatureMap
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eURIFragmentSegm
> ent(BasicEObjectImpl.java:302)
> at org.eclipse.emf.ecore.resource.impl.ResourceImpl.getURIFragm
> ent(ResourceImpl.java:678)
> at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.getURIFragmen
> t(XMLResourceImpl.java:423)
> at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.getURIFragment(
> XMLHelperImpl.java:718)
> ..
>
> Do I have to implement associations in a different way (like cloning
> BatchJob parameters)? I really appreciate any kind of help.
>
> Thank you,
> Peter


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [Xtend] Creation of associations (ClassCastException) [message #659462 is a reply to message #658541] Mon, 14 March 2011 07:28 Go to previous messageGo to next message
Peter Sasse is currently offline Peter SasseFriend
Messages: 5
Registered: March 2011
Junior Member
Hi Ed,

thank you for your reply. In the last days I tried to figure out, what the problem is.
May I ask you, when I cannot get a solution (what do you need for analysis)?

Thank you & regards,
Peter
Re: [Xtend] Creation of associations (ClassCastException) [message #659576 is a reply to message #659462] Mon, 14 March 2011 15:54 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31780
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------090300060501080309070109
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Peter,

At this line:

BasicEObjectImpl.java:302

The code is walking the referenced objects


public String eURIFragmentSegment(EStructuralFeature
eStructuralFeature, EObject eObject)
{
if (eStructuralFeature == null)
{
for (@SuppressWarnings("unchecked")
EContentsEList.FeatureIterator<EObject> crossReferences =

(EContentsEList.FeatureIterator<EObject>)((InternalEList<? >)eCrossReferences()).basicIterator();

crossReferences.hasNext(); )
{
EObject crossReference = crossReferences.next();
if (crossReference == eObject)
{
eStructuralFeature = crossReferences.feature();
}
}
}

StringBuilder result = new StringBuilder();
result.append('@');
result.append(eStructuralFeature.getName());

if (eStructuralFeature instanceof EAttribute)
{

All the objects in the eCrossReferences() must be EObjects and they can
only be there by virtue of a EReference or an EAttribute that's a
feature map. So, what's an an EAttribute of type string doing there? If
you use the debugger the walk through the logic, you should be able to
discover that somehow this code is returning a bad list.

public static <T> ECrossReferenceEList<T>
createECrossReferenceEList(EObject eObject)
{
EStructuralFeature [] eStructuralFeatures =

((EClassImpl.FeatureSubsetSupplier)eObject.eClass().getEAllS tructuralFeatures()).crossReferences();

You'll see that in EClassImpl

private void init()
{
BasicEList<EStructuralFeature> containmentsList = new
EStructuralFeatureUniqueEList();
BasicEList<EStructuralFeature> crossReferencesList = new
EStructuralFeatureUniqueEList();
boolean isMixed =
"mixed".equals(EcoreUtil.getAnnotation(EClassImpl.this,
ExtendedMetaData.ANNOTATION_URI, "kind"));
for (int i = 0; i < size; ++i)
{
// Skip derived features.
//
EStructuralFeature eStructuralFeature =
(EStructuralFeature)data[i];
if (eStructuralFeature instanceof EReference)
{
EReference eReference = (EReference)eStructuralFeature;
if (eReference.isContainment())
{
if (!eReference.isDerived())
{
containmentsList.add(eReference);
}
}
else if (!eReference.isContainer())
{
// Include derived relations only if they won't also
come from mixed or a group.
//
if (!eReference.isDerived() ||
!isMixed &&
EcoreUtil.getAnnotation(eReference, ExtendedMetaData.ANNOTATION_URI,
"group") == null)
{
*crossReferencesList*.add(eReference);
}
}
}
else if (FeatureMapUtil.isFeatureMap(eStructuralFeature))
{
if (!eStructuralFeature.isDerived())
{
containmentsList.add(eStructuralFeature);
*crossReferencesList*.add(eStructuralFeature);
}
}
}

It should only be possible that EReferences and EAttributes that are
features maps are in the list of cross references...

In the end, you need to do the analysis...


Peter Sasse wrote:
> Hi Ed,
>
> thank you for your reply. In the last days I tried to figure out, what
> the problem is. May I ask you, when I cannot get a solution (what do
> you need for analysis)?
>
> Thank you & regards,
> Peter

--------------090300060501080309070109
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Peter,<br>
<br>
At this line:<br>
<blockquote>BasicEObjectImpl.java:302<br>
</blockquote>
<small><big>The code is walking the referenced objects </big></small><br>
<blockquote><small><br>
  public String eURIFragmentSegment(EStructuralFeature
eStructuralFeature, EObject eObject)<br>
  {<br>
    if (eStructuralFeature == null)<br>
    {<br>
      for (@SuppressWarnings("unchecked")
EContentsEList.FeatureIterator&lt;EObject&gt; crossReferences = <br>
            
(EContentsEList.FeatureIterator&lt;EObject&gt;)((Int ernalEList&lt;?&gt;)eCrossReferences()).basicIterato r();
<br>
           crossReferences.hasNext(); )<br>
      {<br>
        EObject crossReference = crossReferences.next();<br>
        if (crossReference == eObject)<br>
        {<br>
          eStructuralFeature = crossReferences.feature();<br>
        }<br>
      }<br>
    }<br>
    <br>
    StringBuilder result = new StringBuilder();<br>
    result.append('@');<br>
    result.append(eStructuralFeature.getName());<br>
<br>
    if (eStructuralFeature instanceof EAttribute)<br>
    {<br>
</small></blockquote>
All the objects in the eCrossReferences() must be EObjects and they can
only be there by virtue of a EReference or an EAttribute that's a
feature map.  So, what's an an EAttribute of type string doing there?
If you use the debugger the walk through the logic, you should be able
to discover that somehow this code is returning a bad list.<br>
<br>
<small>  public static &lt;T&gt; ECrossReferenceEList&lt;T&gt;
createECrossReferenceEList(EObject eObject)<br>
  {<br>
    EStructuralFeature [] eStructuralFeatures = <br>
     
((EClassImpl.FeatureSubsetSupplier)eObject.eClass().getEAllS tructuralFeatures()).crossReferences(); </small><br>
<br>
You'll see that in EClassImpl<br>
<br>
<blockquote><small>        private void init()</small><br>
<small>        {</small><br>
<small>          BasicEList&lt;EStructuralFeature&gt;
containmentsList = new EStructuralFeatureUniqueEList();</small><br>
<small>          BasicEList&lt;EStructuralFeature&gt;
crossReferencesList = new EStructuralFeatureUniqueEList();</small><br>
<small>          boolean isMixed =
"mixed".equals(EcoreUtil.getAnnotation(EClassImpl.this,
ExtendedMetaData.ANNOTATION_URI, "kind"));</small><br>
<small>          for (int i = 0;  i &lt; size; ++i)</small><br>
<small>          {</small><br>
<small>            // Skip derived features.</small><br>
<small>            //</small><br>
<small>            EStructuralFeature eStructuralFeature =
(EStructuralFeature)data[i];</small><br>
<small>            if (eStructuralFeature instanceof EReference)</small><br>
<small>            {</small><br>
<small>              EReference eReference =
(EReference)eStructuralFeature;</small><br>
<small>              if (eReference.isContainment())</small><br>
<small>              {</small><br>
<small>                if (!eReference.isDerived())</small><br>
<small>                {</small><br>
<small>                  containmentsList.add(eReference);</small><br>
<small>                }</small><br>
<small>              }</small><br>
<small>              else if (!eReference.isContainer())</small><br>
<small>              {</small><br>
<small>                // Include derived relations only if they
won't also come from mixed or a group.</small><br>
<small>                //</small><br>
<small>                if (!eReference.isDerived() || </small><br>
<small>                      !isMixed &amp;&amp;
EcoreUtil.getAnnotation(eReference, ExtendedMetaData.ANNOTATION_URI,
"group") == null)</small><br>
<small>                {</small><br>
<small>                  <b>crossReferencesList</b>.add(eReference);</small><br>
<small>                }</small><br>
<small>              }</small><br>
<small>            }</small><br>
<small>            else if
(FeatureMapUtil.isFeatureMap(eStructuralFeature))</small><br >
<small>            {</small><br>
<small>              if (!eStructuralFeature.isDerived())</small><br>
<small>              {</small><br>
<small>                containmentsList.add(eStructuralFeature);</small><br>
<small>                <b>crossReferencesList</b>.add(eStructuralFeature);</small ><br>
<small>              }</small><br>
<small>            }</small><br>
<small>          }</small><br>
</blockquote>
It should only be possible that EReferences and EAttributes that are
features maps are in the list of cross references...<br>
<br>
In the end, you need to do the analysis...<br>
<br>
<br>
Peter Sasse wrote:
<blockquote cite="mid:ilkflh$p23$1@news.eclipse.org" type="cite">Hi Ed,
<br>
<br>
thank you for your reply. In the last days I tried to figure out, what
the problem is. May I ask you, when I cannot get a solution (what do
you need for analysis)?
<br>
<br>
Thank you &amp; regards,
<br>
Peter
<br>
</blockquote>
</body>
</html>

--------------090300060501080309070109--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [Xtend] Creation of associations (ClassCastException) [message #659844 is a reply to message #659576] Tue, 15 March 2011 18:50 Go to previous messageGo to next message
Peter Sasse is currently offline Peter SasseFriend
Messages: 5
Registered: March 2011
Junior Member
Hi Ed,

thank you for your efforts. I found something (but not the solution Sad ):
Situation while debugging (good hint):
- method eInternalContainer in BasicEObjectImpl returns object of type BatchNet
- method eContainerFeatureID in BasicEObjectImpl for object of type BatchStream is equal -1
- thus: BasicEObjectImpl.eContainingFeature returns an String-attribute (of class BatchNet) instead of the reference

Metamodel:
BatchStream inherits from BatchNetNode
BatchJob inherits also from BatchNetNode
BatchNet aggregates objects of type BatchNetNode

Is there a problem with the metamodel? Do I have an error here?
I have to look futher, what is happening while putting objects of type BatchStream into BatchNet...

Regards,
Peter
Re: [Xtend] Creation of associations (ClassCastException) [message #659863 is a reply to message #659844] Tue, 15 March 2011 19:29 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31780
Registered: July 2009
Senior Member
Peter,

Comments below.


Peter Sasse wrote:
> Hi Ed,
>
> thank you for your efforts. I found something (but not the solution
> :( ):
> Situation while debugging (good hint):
> - method eInternalContainer in BasicEObjectImpl returns object of type
> BatchNet
> - method eContainerFeatureID in BasicEObjectImpl for object of type
> BatchStream is equal -1
> - thus: BasicEObjectImpl.eContainingFeature returns an
> String-attribute (of class BatchNet) instead of the reference
Have these models been changing to add features?
>
> Metamodel:
> BatchStream inherits from BatchNetNode
> BatchJob inherits also from BatchNetNode
> BatchNet aggregates objects of type BatchNetNode
Are all these classes in the same package or is it possible some are in
a base package and derived classes in another package need to be
regenerated?
>
> Is there a problem with the metamodel?
Certainly some wires are cross, but why...
> Do I have an error here?
> I have to look futher, what is happening while putting objects of type
> BatchStream into BatchNet...
Have a look at what happens in eBasicSetContainer when you add it to the
containment reference. The feature ID there should be -1 - <the feature
of the containment reference in the parent class>.
>
> Regards,
> Peter


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [Xtend] Creation of associations (ClassCastException) [message #660235 is a reply to message #659863] Thu, 17 March 2011 14:08 Go to previous messageGo to next message
Peter Sasse is currently offline Peter SasseFriend
Messages: 5
Registered: March 2011
Junior Member
Hi Ed,

first regarding your questions:
> Have these models been changing to add features?
> Have a look at what happens in eBasicSetContainer when you add it to the
> containment reference. The feature ID there should be -1 - <the feature
> of the containment reference in the parent class>.
> Are all these classes in the same package or is it possible some are in
> a base package and derived classes in another package need to be
> regenerated?
All mentioned classes are in the same package. But I am using two ecores. One model is from that type used to be read from, one model is from that type used to be read and merged the content of the first model into it. The feature ID of the model (first ecore) is other than -1, the feature IDs of the merged model (second ecore) is equal to -1.

Thus I found the bug, that creating the BatchStream aggregations into BatchNets won't set the object at the opposite role for BatchStream. I saw, that traversing to BatchStream and back to BatchNet returns null. Now explicite setting of the object at the opposite role (BatchNet) inside object of type BatchStream leads to following exception:
...
EvaluationException : The value of type 'org.eclipse.emf.ecore.impl.EClassImpl@4c594c59 (name: BatchNet)...' must be of type 'org.eclipse.emf.ecore.impl.EClassImpl@25d625d6 (name: BatchNet) ...'
...

Is above issue related to http://www.openarchitectureware.org/forum/viewtopic.php?foru m=2&showtopic=11530, or is following opposite setting wrong?
create mmBatch::BatchStream createCtmStream(mmCtm::SCHED_GROUP ctmSchedTable, mmBatch::BatchNet net) : ... -> this.setBatchnet(net);


Thank you & kind regards,
Peter

[Updated on: Thu, 17 March 2011 14:09]

Report message to a moderator

Re: [Xtend] Creation of associations (ClassCastException) [message #660286 is a reply to message #660235] Thu, 17 March 2011 15:35 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31780
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000706030202030905090506
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Peter,

Comments below.

Peter Sasse wrote:
> Hi Ed,
>
> first regarding your questions:
>> Have these models been changing to add features? Have a look at what
>> happens in eBasicSetContainer when you add it to the containment
>> reference. The feature ID there should be -1 - <the feature of the
>> containment reference in the parent class>.
>> Are all these classes in the same package or is it possible some are
>> in a base package and derived classes in another package need to be
>> regenerated?
> All mentioned classes are in the same package. But I am using two ecores.
Hmmm. This sounds fishy.
> One model is from that type used to be read from, one model is from
> that type used to be read and merged the content of the first model
> into it.
Not sure what that means and I'm not sure what you mean by there being
two Ecore in the same package.
> The feature ID of the model (first ecore) is other than -1, the
> feature IDs of the merged model (second ecore) is equal to -1.
Feature IDs are never negative.

The encoding for tracking the container/containment feature is like this:

/**
* The feature ID of this object's container holding feature, if
there is one,
* or {@link #EOPPOSITE_FEATURE_BASE EOPPOSITE_FEATURE_BASE} minus
the feature ID of the container's feature that contains this object.
*/
protected int eContainerFeatureID;

So it sounds to me like there is some inconsistency between the
containment feature IDs you use in the two different cases.
>
> Thus I found the bug, that creating the BatchStream aggregations into
> BatchNets won't set the object at the opposite role for BatchStream.
It's hard for me to imagine how that's possible, but then I have no idea
what you mean by "two Ecore" when you've only described one model...
> I saw, that traversing to BatchStream and back to BatchNet returns
> null. Now explicite setting of the object at the opposite role
> (BatchNet) inside object of type BatchStream leads to following
> exception:
> ..
> EvaluationException : The value of type
> mailto:'org.eclipse.emf.ecore.impl.EClassImpl@4c594c59 (name:
> BatchNet)...' must be of type
> mailto:'org.eclipse.emf.ecore.impl.EClassImpl@25d625d6 (name: BatchNet)
So clearly you have two different versions of the model and you're
mixing up instances of these two as if they should be instances of just
a single model. That's not going to work.
> ...'
> ..
>
> Is above issue related to
> http://www.openarchitectureware.org/forum/viewtopic.php?foru m=2&showtopic=11530,
> or is following opposite setting wrong?
It doesn't sound related.
> create mmBatch::BatchStream createCtmStream(mmCtm::SCHED_GROUP
> ctmSchedTable, mmBatch::BatchNet net) : ... -> this.setBatchnet(net);
>
>
> Thank you & kind regards,
> Peter

--------------000706030202030905090506
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Peter,<br>
<br>
Comments below.<br>
<br>
Peter Sasse wrote:
<blockquote cite="mid:ilt48g$5p1$1@news.eclipse.org" type="cite">Hi Ed,
<br>
<br>
first regarding your questions:
<br>
<blockquote type="cite">Have these models been changing to add
features? Have a look at what happens in eBasicSetContainer when you
add it to the containment reference. The feature ID there should be -1
- &lt;the feature of the containment reference in the parent class&gt;.
<br>
Are all these classes in the same package or is it possible some are in
a base package and derived classes in another package need to be
regenerated?
<br>
</blockquote>
All mentioned classes are in the same package. But I am using two
ecores.</blockquote>
Hmmm.  This sounds fishy.<br>
<blockquote cite="mid:ilt48g$5p1$1@news.eclipse.org" type="cite"> One
model is from that type used to be read from, one model is from that
type used to be read and merged the content of the first model into it.</blockquote>
Not sure what that means and I'm not sure what you mean by there being
two Ecore in the same package.  <br>
<blockquote cite="mid:ilt48g$5p1$1@news.eclipse.org" type="cite"> The
feature ID of the model (first ecore) is other than -1, the feature IDs
of the merged model (second ecore) is equal to -1.
<br>
</blockquote>
Feature IDs are never negative.  <br>
<br>
The encoding for tracking the container/containment feature is like
this:<br>
<blockquote>  /**<br>
   * The feature ID of this object's container holding feature, if
there is one,<br>
   * or {@link #EOPPOSITE_FEATURE_BASE EOPPOSITE_FEATURE_BASE} minus
the feature ID of the container's feature that contains this object.<br>
   */<br>
  protected int eContainerFeatureID;<br>
</blockquote>
So it sounds to me like there is some inconsistency between the
containment feature IDs you use in the two different cases.<br>
<blockquote cite="mid:ilt48g$5p1$1@news.eclipse.org" type="cite"><br>
Thus I found the bug, that creating the BatchStream aggregations into
BatchNets won't set the object at the opposite role for BatchStream. </blockquote>
It's hard for me to imagine how that's possible, but then I have no
idea what you mean by "two Ecore" when you've only described one
model...<br>
<blockquote cite="mid:ilt48g$5p1$1@news.eclipse.org" type="cite">I saw,
that traversing to BatchStream and back to BatchNet returns null. Now
explicite setting of the object at the opposite role (BatchNet) inside
object of type BatchStream leads to following exception:
<br>
...
<br>
EvaluationException : The value of type
<a class="moz-txt-link-freetext" href="mailto:'org.eclipse.emf.ecore.impl.EClassImpl@4c594c59">mailto:'org.eclipse.emf.ecore.impl.EClassImpl@4c594c59</a> (name:
BatchNet)...' must be of type
<a class="moz-txt-link-freetext" href="mailto:'org.eclipse.emf.ecore.impl.EClassImpl@25d625d6">mailto:'org.eclipse.emf.ecore.impl.EClassImpl@25d625d6</a> (name: BatchNet)</blockquote>
So clearly you have two different versions of the model and you're
mixing up instances of these two as if they should be instances of just
a single model.  That's not going to work.<br>
<blockquote cite="mid:ilt48g$5p1$1@news.eclipse.org" type="cite"> ...'
<br>
...
<br>
<br>
Is above issue related to
<a class="moz-txt-link-freetext" href=" http://www.openarchitectureware.org/forum/viewtopic.php?foru m=2&showtopic=11530"> http://www.openarchitectureware.org/forum/viewtopic.php?foru m=2&amp;showtopic=11530</a>,
or is following opposite setting wrong?
<br>
</blockquote>
It doesn't sound related.<br>
<blockquote cite="mid:ilt48g$5p1$1@news.eclipse.org" type="cite">    create
mmBatch::BatchStream createCtmStream(mmCtm::SCHED_GROUP ctmSchedTable,
mmBatch::BatchNet net) : ... -&gt; this.setBatchnet(net);
<br>
<br>
<br>
Thank you &amp; kind regards,
<br>
Peter
<br>
</blockquote>
</body>
</html>

--------------000706030202030905090506--


Ed Merks
Professional Support: https://www.macromodeling.com/
icon14.gif  Re: [Xtend] Creation of associations (ClassCastException) [message #660549 is a reply to message #660286] Sat, 19 March 2011 08:47 Go to previous message
Peter Sasse is currently offline Peter SasseFriend
Messages: 5
Registered: March 2011
Junior Member
Hi Ed,

you are correct: mixing up instances of different versions of the model is the problem!

Now is works! Very Happy

Solution: Executing the normal clone() method on BatchNet instance returns one version of the model, but I inserted BatchStream instances of the other version of the model into it. Now I created a dedicated cloneBatchNet() method, which "copies" all properties of BatchNet instance etc.

I appreciate very much your hints and your help, Ed. Thank you!

Regards,
Peter
Previous Topic:[ATL] Missing OCL language constructs
Next Topic:[QVTo] Running from Java: Adding two models [SOLVED]
Goto Forum:
  


Current Time: Sun Mar 07 18:18:39 GMT 2021

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

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

Back to the top