Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Error reloading genmodel
Error reloading genmodel [message #1803489] Fri, 01 March 2019 14:59 Go to next message
Udo Walker is currently offline Udo WalkerFriend
Messages: 48
Registered: January 2013
Member
I want to reload my genmodel from my "Annotated Java" and get an empty wizard page.

In the error log there is this exception:

java.lang.ClassCastException: org.eclipse.emf.ecore.xcore.impl.XPackageImpl cannot be cast to org.eclipse.emf.codegen.ecore.genmodel.GenModel
	at org.eclipse.emf.importer.java.builder.JavaEcoreBuilder.computeEPackages(JavaEcoreBuilder.java:652)
	at org.eclipse.emf.importer.java.JavaImporter.doComputeEPackages(JavaImporter.java:97)
	at org.eclipse.emf.importer.ModelImporter.computeEPackages(ModelImporter.java:522)
	at org.eclipse.emf.importer.java.ui.JavaPackagePage.computeEPackages(JavaPackagePage.java:102)
	at org.eclipse.emf.importer.java.ui.JavaPackagePage$2.execute(JavaPackagePage.java:77)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.lambda$0(WorkspaceModifyOperation.java:110)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2295)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2322)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:131)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:440)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:356)
	at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:977)
	at org.eclipse.emf.importer.java.ui.JavaPackagePage.computeEPackages(JavaPackagePage.java:92)
	at org.eclipse.emf.importer.java.ui.JavaPackagePage$1.run(JavaPackagePage.java:54)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3919)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3550)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:822)
	at org.eclipse.jface.window.Window.open(Window.java:798)
	at org.eclipse.emf.converter.ui.OpenWizardActionDelegate.run(OpenWizardActionDelegate.java:132)
	at org.eclipse.emf.converter.ui.OpenWizardActionDelegate.run(OpenWizardActionDelegate.java:122)


There is a containment reference to an EMF model which is created with Xcore.

Do I have to change the Xcore model to be compatible with the EMF generator? Or is this a missing feature?


I use Eclipse 2018-12 and EMF 2.16.0.
Re: Error reloading genmodel [message #1803511 is a reply to message #1803489] Sat, 02 March 2019 01:44 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
It's likely that a combination of a model based on Java annotations that depends on a model that is defined with Xcore has never been tested. Please open a Bugzilla with a small test case that reproduces the problem.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Error reloading genmodel [message #1803667 is a reply to message #1803511] Wed, 06 March 2019 14:00 Go to previous messageGo to next message
Udo Walker is currently offline Udo WalkerFriend
Messages: 48
Registered: January 2013
Member
I added a zip with 2 projects:


  1. de.project_annotated
  2. de_project_xcore


The 1st one contains 1 interface with the type TypeA and Java comments to annotate the type and the only method "getTypeB".

The 2nd project is an Xcore project which contains only 1 class TypeB.

TypeA refers TypeB. This does not work.

If you try to reload the genmodel in project 1 you will see an empty wizard window and the exception in the error log.

I found the same error in this forum entry:
https://www.eclipse.org/forums/index.php?t=msg&th=1095423&goto=1795880&#msg_1795880
Re: Error reloading genmodel [message #1803677 is a reply to message #1803667] Wed, 06 March 2019 15:37 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Please open a Bugzilla.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Error reloading genmodel [message #1803721 is a reply to message #1803677] Thu, 07 March 2019 14:53 Go to previous message
Udo Walker is currently offline Udo WalkerFriend
Messages: 48
Registered: January 2013
Member
I opened bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=545178 .
Previous Topic:[CDO] Committing large amounts of data as a single commit
Next Topic:[XCore] XcoreLang.xcore content is not allowed in Prolog
Goto Forum:
  


Current Time: Tue Apr 23 15:19:01 GMT 2024

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

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

Back to the top