Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Edapt]
[Edapt] [message #735038] Mon, 10 October 2011 17:42 Go to next message
jschoedt Mising name is currently offline jschoedt Mising nameFriend
Messages: 11
Registered: March 2010
Junior Member
Hi all,

I get an error when I try to migrate an initial model to the next release. I should mention that my ecore is split up in 5-6 models that 'inherit' from each other in a hierarchy. I initially created my history on the bottom ecore so that it records all changes in the parent models. This seemed to be the only way to make a common history file.

I hope some of you can point me in the right direction. Thanks in advance.


  public EList<Resource> performMigration(final Release release, IProgressMonitor monitor) throws MigrationException {
    Migrator migrator = getMigrator();
    [color=red]ResourceSet resourceSet = migrator.migrateAndLoad(Collections.singletonList(resourceURI), release, null, monitor);[/color]
    return resourceSet.getResources();
  }


java.lang.ArrayStoreException
	at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.java:124)
	at org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList.java:424)
	at org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUnique(NotifyingListImpl.java:331)
	at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUnique(NotifyingListImpl.java:315)
	at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:307)
	at org.eclipse.emf.edapt.history.reconstruction.EcoreReconstructorSwitchBase.add(EcoreReconstructorSwitchBase.java:52)
	at org.eclipse.emf.edapt.history.reconstruction.EcoreReconstructorSwitchBase.create(EcoreReconstructorSwitchBase.java:97)
	at org.eclipse.emf.edapt.history.reconstruction.EcoreForwardReconstructor$EcoreReconstructorSwitch.caseCreate(EcoreForwardReconstructor.java:121)
	at org.eclipse.emf.edapt.history.util.HistorySwitch.doSwitch(HistorySwitch.java:175)
	at org.eclipse.emf.edapt.history.util.HistorySwitch.doSwitch(HistorySwitch.java:99)
	at org.eclipse.emf.edapt.history.util.HistorySwitch.doSwitch(HistorySwitch.java:87)
	at org.eclipse.emf.edapt.history.reconstruction.EcoreForwardReconstructor.startChange(EcoreForwardReconstructor.java:72)
	at org.eclipse.emf.edapt.history.reconstruction.ForwardReconstructorBase.doReconstruct(ForwardReconstructorBase.java:99)
	at org.eclipse.emf.edapt.history.reconstruction.ForwardReconstructorBase.doReconstruct(ForwardReconstructorBase.java:104)
	at org.eclipse.emf.edapt.history.reconstruction.ForwardReconstructorBase.doReconstruct(ForwardReconstructorBase.java:80)
	at org.eclipse.emf.edapt.history.reconstruction.ForwardReconstructorBase.doReconstruct(ForwardReconstructorBase.java:58)
	at org.eclipse.emf.edapt.history.reconstruction.CompositeReconstructorBase.reconstruct(CompositeReconstructorBase.java:75)
	at org.eclipse.emf.edapt.migration.execution.Migrator.migrate(Migrator.java:233)
	at org.eclipse.emf.edapt.migration.execution.Migrator.migrateAndLoad(Migrator.java:185)
	at com.virtubuild.studio.migrator.MigratorUtil.performMigration(MigratorUtil.java:53)
	at com.virtubuild.studio.application.model.WorkspaceIOUtils.loadWorkspace(WorkspaceIOUtils.java:207)
	at com.virtubuild.studio.application.model.appl.internal.ApplicationStateImpl.performLoad(ApplicationStateImpl.java:627)
	at com.virtubuild.studio.application.model.appl.internal.Migrator1to2Test.setUpBeforeClass(Migrator1to2Test.java:43)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:62)
	at org.eclipse.pde.internal.junit.runtime.CoreTestApplication.run(CoreTestApplication.java:23)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1384)


[Updated on: Mon, 10 October 2011 17:43]

Report message to a moderator

Re: [Edapt] [message #735311 is a reply to message #735038] Tue, 11 October 2011 13:59 Go to previous messageGo to next message
Markus Herrmannsdoerfer is currently offline Markus HerrmannsdoerferFriend
Messages: 50
Registered: July 2009
Member
Hi *,

there seems to be an issue in your history. However, without the history
it is hard for me to tell. Is it possible that you send me the history
together with the ecores? Or can I access them online. As an
alternative, we could also do screen sharing and I can take a look at
them (my Skype account herrmi). Sorry that there is no other way for me
to help you.
Cheers,

Markus

Am 10.10.2011 19:42, schrieb jschoedt:
> Hi all,
>
> I get an error when I try to migrate an initial model to the next
> release. I should mention that my ecore is split up in 5-6 models that
> 'inherit' from each other in a hierarchy. I initially created my history
> on the bottom ecore so that it records all changes in the parent models.
> This seemed to be the only way to make a common history file.
> I hope some of you can point me in the right direction. Thanks in advance.
>
>
> public EList<Resource> performMigration(final Release release,
> IProgressMonitor monitor) throws MigrationException {
> Migrator migrator = getMigrator();
> ResourceSet resourceSet =
> migrator.migrateAndLoad(Collections.singletonList(resourceURI), release,
> null, monitor);

> return resourceSet.getResources();
> }
>
>
> java.lang.ArrayStoreException
> at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.java:124)
> at org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList.java:424)
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUnique(NotifyingListImpl.java:331)
>
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUnique(NotifyingListImpl.java:315)
>
> at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:307)
> at
> org.eclipse.emf.edapt.history.reconstruction.EcoreReconstructorSwitchBase.add(EcoreReconstructorSwitchBase.java:52)
>
> at
> org.eclipse.emf.edapt.history.reconstruction.EcoreReconstructorSwitchBase.create(EcoreReconstructorSwitchBase.java:97)
>
> at
> org.eclipse.emf.edapt.history.reconstruction.EcoreForwardReconstructor$EcoreReconstructorSwitch.caseCreate(EcoreForwardReconstructor.java:121)
>
> at
> org.eclipse.emf.edapt.history.util.HistorySwitch.doSwitch(HistorySwitch.java:175)
>
> at
> org.eclipse.emf.edapt.history.util.HistorySwitch.doSwitch(HistorySwitch.java:99)
>
> at
> org.eclipse.emf.edapt.history.util.HistorySwitch.doSwitch(HistorySwitch.java:87)
>
> at
> org.eclipse.emf.edapt.history.reconstruction.EcoreForwardReconstructor.startChange(EcoreForwardReconstructor.java:72)
>
> at
> org.eclipse.emf.edapt.history.reconstruction.ForwardReconstructorBase.doReconstruct(ForwardReconstructorBase.java:99)
>
> at
> org.eclipse.emf.edapt.history.reconstruction.ForwardReconstructorBase.doReconstruct(ForwardReconstructorBase.java:104)
>
> at
> org.eclipse.emf.edapt.history.reconstruction.ForwardReconstructorBase.doReconstruct(ForwardReconstructorBase.java:80)
>
> at
> org.eclipse.emf.edapt.history.reconstruction.ForwardReconstructorBase.doReconstruct(ForwardReconstructorBase.java:58)
>
> at
> org.eclipse.emf.edapt.history.reconstruction.CompositeReconstructorBase.reconstruct(CompositeReconstructorBase.java:75)
>
> at
> org.eclipse.emf.edapt.migration.execution.Migrator.migrate(Migrator.java:233)
>
> at
> org.eclipse.emf.edapt.migration.execution.Migrator.migrateAndLoad(Migrator.java:185)
>
> at
> com.virtubuild.studio.migrator.MigratorUtil.performMigration(MigratorUtil.java:53)
>
> at
> com.virtubuild.studio.application.model.WorkspaceIOUtils.loadWorkspace(WorkspaceIOUtils.java:207)
>
> at
> com.virtubuild.studio.application.model.appl.internal.ApplicationStateImpl.performLoad(ApplicationStateImpl.java:627)
>
> at
> com.virtubuild.studio.application.model.appl.internal.Migrator1to2Test.setUpBeforeClass(Migrator1to2Test.java:43)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>
> at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>
> at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>
> at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
>
> at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
> at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
>
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
>
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
>
> at
> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:62)
>
> at
> org.eclipse.pde.internal.junit.runtime.CoreTestApplication.run(CoreTestApplication.java:23)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
>
>
>
Re: [Edapt] [message #754337 is a reply to message #735311] Wed, 02 November 2011 08:53 Go to previous messageGo to next message
jschoedt Mising name is currently offline jschoedt Mising nameFriend
Messages: 11
Registered: March 2010
Junior Member
Hi Markus,

I have created a minimal example for you and some videos you can look at.
I was not able to reach the point where I get the error above because I run into some other issues with this example. But I hope you can use it anyway.

There seems to be some issues in using ecore models located in different plugins etc.


Problem1: http://screencast.com/t/cOk77YXEnQ

Problem2: http://screencast.com/t/adWGyS5PwPQD


Thanks for the help, Jens

PS: You can send me a private message with your email if you have some questions. I was not able to send you a private message....

[Updated on: Wed, 02 November 2011 08:55]

Report message to a moderator

Re: [Edapt] [message #754930 is a reply to message #754337] Sat, 05 November 2011 09:53 Go to previous message
Markus Herrmannsdoerfer is currently offline Markus HerrmannsdoerferFriend
Messages: 50
Registered: July 2009
Member
Hi Jens,

Am 02.11.2011 09:53, schrieb jschoedt:
> Hi Markus,
>
> I have created a minimal example for you and some videos you can look at.
> I was not able to reach the point where I get the error above because I run into some other issues with this example. But I hope you can use it anyway.
>
> There seems to be some issues in using ecore models located in different plugins etc.
Thanks for creating a minimal example. That helps me to locate the errors.
>
>
> Problem1: http://screencast.com/t/cOk77YXEnQ
You correctly created the history based on the metamodel that depends on
the other metamodel. That way the history is recorded for both metamodel
resources.

You should use the operation "Delete Feature" in the operation browser
which provides the appropriate migration for deleting an attribute.
Otherwise, there will be an error during migration.

The problem that the namespaces URIs are not correctly updated is a bug
and has been fixed: https://bugs.eclipse.org/bugs/show_bug.cgi?id=362964
I will now create a new release for the update site.

Currently, Edapt requires to update the namespace URIs of all
participating metamodel resources. However, in your case, only the
namespace URI of one metamodel resources is changed due to the
replacement. You can also change the namespace URIs manually and then
press release and a new release will be created. Usually, however, you
have a version number (e.g. 0.1.4) in your namespace URIs. And the
dialog tries to automatically detect the version number and replace them
in all namespace URIs. In your case, you did not have a version number
before and therefore the detection cannot find one.
>
> Problem2: http://screencast.com/t/adWGyS5PwPQD
The second problem is a result of the first problem. If all namespace
URIs are updated, then the release will be correctly detected and
migration will be performed. However, the requirement to update all
namespace URIs may be too restrictive. What do you think?
>
>
> Thanks for the help, Jens
I hope that helps.
Cheers,

Markus
Previous Topic:export from xml to EMF possibilities
Next Topic:Is it possible to modify/delete an eReference from an EObject?
Goto Forum:
  


Current Time: Fri Oct 30 09:10:55 GMT 2020

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

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

Back to the top