Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Problems encountered in the model (Problems encountered in the model )
Problems encountered in the model [message #1834645] Sat, 14 November 2020 12:39 Go to next message
John Henbergs is currently offline John HenbergsFriend
Messages: 239
Registered: October 2020
Senior Member
Hi all,

I have created a UML profile as follows:

index.php/fa/39301/0/

I tried to generate an ecore model, but the genmode has the following error:

index.php/fa/39302/0/

Do you know what the issue might be?

Thank you!
Re: Problems encountered in the model [message #1834646 is a reply to message #1834645] Sat, 14 November 2020 12:58 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi,

It looks like you're trying to generate there UML métalloïdes in addition to your profile. You need to référence the UML generator model instead from your genmodel. Otherwise, you will have a profile that can only be used with your private UML and not the common implementation.

HTH,
Christian
Re: Problems encountered in the model [message #1834647 is a reply to message #1834646] Sat, 14 November 2020 13:29 Go to previous messageGo to next message
John Henbergs is currently offline John HenbergsFriend
Messages: 239
Registered: October 2020
Senior Member
Hi Christian,

Thank you for your answer. I am new to Papyrus, so could you please provide a more detailed answer on how could I do that?

Thank you very much!
Re: Problems encountered in the model [message #1834648 is a reply to message #1834647] Sat, 14 November 2020 13:34 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

This isn't really a Papyrus concern. It's an EMF/UML2 thing.

When you "load" the source model (your profile) in the GenModel editor, there's a page in which you have to choose which EPackages to generate (the top portion of the page)
and which to reference to their own existing GenModels (the bottom portion). You need to make sure that you have the UML GenModel from the Eclipse UML2 project in the bottom part
and select it with the checkbox. If you are working in a Papyrus installation of some kind (Eclipse Modeling package or a Papyrus RCP) then it should be available.

HTH,
Christian
Re: Problems encountered in the model [message #1834651 is a reply to message #1834648] Sat, 14 November 2020 14:27 Go to previous messageGo to next message
John Henbergs is currently offline John HenbergsFriend
Messages: 239
Registered: October 2020
Senior Member
Thank you! I was able to fix that. These are the packages that I generated and the ones that I referenced.
index.php/fa/39303/0/
However, now I get another issue.
index.php/fa/39304/0/
Re: Problems encountered in the model [message #1834652 is a reply to message #1834648] Sat, 14 November 2020 14:29 Go to previous messageGo to next message
John Henbergs is currently offline John HenbergsFriend
Messages: 239
Registered: October 2020
Senior Member
And I also get this error

index.php/fa/39305/0/
Re: Problems encountered in the model [message #1834653 is a reply to message #1834652] Sat, 14 November 2020 14:33 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

You definitely also should reference the Ecore genmodel, not generate your own copy of Ecore. In general, if you can reference an existing generated model, it is best for interoperability to do so.

I have no information about the error markers on the elements of the Corona package. These errors could be pretty much anything, but EMF's Ecore validation is pretty good about making error messages that explain themselves.

Christian
Re: Problems encountered in the model [message #1834654 is a reply to message #1834653] Sat, 14 November 2020 14:59 Go to previous messageGo to next message
John Henbergs is currently offline John HenbergsFriend
Messages: 239
Registered: October 2020
Senior Member
Ok, so after trying what you said, I do not get any more errors in my genmodel. However, what I am trying to do is automatically generate an XText grammar for it. With the above approach where I generate all packages but Corona, when I generate the XText grammar., I get some errors.
This is the code I get.

index.php/fa/39306/0/

And the errors I get are as follows:

Line 11, same on Line 30
Multiple markers at this line
- extraneous input '|' expecting RULE_ID
- Couldn't resolve reference to EClassifier 'EString'.

Line 12
EString cannot be resolved to a rule

Line 33
Multiple markers at this line
- missing RULE_ID at ':'
- The rule 'EDataType' may be consumed without object instantiation.
Add an action to ensure object creation, e.g. '{null}'.
- Cannot create type 'EDataType' in alias null
Re: Problems encountered in the model [message #1834658 is a reply to message #1834653] Sat, 14 November 2020 18:38 Go to previous messageGo to next message
John Henbergs is currently offline John HenbergsFriend
Messages: 239
Registered: October 2020
Senior Member
And also when I debug it I still get the following:

0    [main] INFO  text.xtext.generator.XtextGenerator  - Initializing Xtext generator
9    [main] INFO  lipse.emf.mwe.utils.StandaloneSetup  - Adding generated EPackage 'org.eclipse.xtext.common.types.TypesPackage'
100  [main] INFO  lipse.emf.mwe.utils.StandaloneSetup  - Registering project org.xtext.example.mydsl2 at 'file:/Users/mlj01/eclipse-workspace/org.xtext.example.mydsl2/'
100  [main] INFO  lipse.emf.mwe.utils.StandaloneSetup  - Registering project org.xtext.example.mydsl2.tests at 'file:/Users/mlj01/eclipse-workspace/org.xtext.example.mydsl2.tests/'
100  [main] INFO  lipse.emf.mwe.utils.StandaloneSetup  - Registering project org.xtext.example.mydsl2.ide at 'file:/Users/mlj01/eclipse-workspace/org.xtext.example.mydsl2.ide/'
100  [main] INFO  lipse.emf.mwe.utils.StandaloneSetup  - Registering project org.xtext.example.mydsl2.ui at 'file:/Users/mlj01/eclipse-workspace/org.xtext.example.mydsl2.ui/'
100  [main] INFO  lipse.emf.mwe.utils.StandaloneSetup  - Registering project org.xtext.example.mydsl2.ui.tests at 'file:/Users/mlj01/eclipse-workspace/org.xtext.example.mydsl2.ui.tests/'
106  [main] INFO  lipse.emf.mwe.utils.StandaloneSetup  - Using resourceSet registry. The registered Packages will not be registered in the global EPackage.Registry.INSTANCE!
247  [main] ERROR mf.mwe2.launch.runtime.Mwe2Launcher  - Problems running workflow org.xtext.example.mydsl2.GenerateMyDsl: java.io.IOException: The path '/Corona/corona.genmodel' is unmapped
java.lang.RuntimeException: Problems running workflow org.xtext.example.mydsl2.GenerateMyDsl: java.io.IOException: The path '/Corona/corona.genmodel' is unmapped
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:105)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:63)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:53)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:79)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:37)
Caused by: org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: java.io.IOException: The path '/Corona/corona.genmodel' is unmapped
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278)
	at org.eclipse.xtext.resource.XtextResourceSet.getResource(XtextResourceSet.java:266)
	at org.eclipse.xtext.xtext.generator.XtextGeneratorResourceSetInitializer.loadResource(XtextGeneratorResourceSetInitializer.java:52)
	at org.eclipse.xtext.xtext.generator.XtextGeneratorResourceSetInitializer.lambda$initialize$0(XtextGeneratorResourceSetInitializer.java:42)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at org.eclipse.xtext.xtext.generator.XtextGeneratorResourceSetInitializer.initialize(XtextGeneratorResourceSetInitializer.java:44)
	at org.eclipse.xtext.xtext.generator.XtextGeneratorLanguage.initialize(XtextGeneratorLanguage.java:219)
	at org.eclipse.xtext.xtext.generator.StandardLanguage.initialize(StandardLanguage.java:192)
	at org.eclipse.xtext.xtext.generator.XtextGenerator.initialize(XtextGenerator.java:186)
	at org.eclipse.xtext.xtext.generator.XtextGenerator.checkConfigurationInternal(XtextGenerator.java:140)
	at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent2.checkConfiguration(AbstractWorkflowComponent2.java:23)
	at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.preInvoke(Mwe2Bridge.java:69)
	at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.preInvoke(AbstractWorkflowComponent.java:208)
	at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.preInvoke(AbstractCompositeWorkflowComponent.java:31)
	at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:20)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:103)
	... 4 more
Caused by: java.io.IOException: The path '/Corona/corona.genmodel' is unmapped
	at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl.createInputStream(PlatformResourceURIHandlerImpl.java:578)
	at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:358)
	at org.eclipse.xtext.resource.XtextResourceSet$1.createInputStream(XtextResourceSet.java:299)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1314)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
	... 19 more

Re: Problems encountered in the model [message #1834669 is a reply to message #1834658] Sun, 15 November 2020 12:08 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

As as been pointed out to you many times already you need to provide a repro.

Clearly your initialization that you decline to share with us is defective otherwise you would not have a problem.

FRom your log I can only observe that the use of file:/ is usually very bad news. You should be using platform:/resource/.... but you provide no means for use to see what you are doing.....

Regards

Ed Willink
Re: Problems encountered in the model [message #1834673 is a reply to message #1834669] Sun, 15 November 2020 12:58 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

See https://www.eclipse.org/forums/index.php/m/1834670/#msg_1834670 on Xtext newsgroup.

Regards

Ed Willink
Previous Topic:Difference between PrimitiveType and <EPackage,ModelLibrary > EDataType
Next Topic:Alf Editor is unavailable
Goto Forum:
  


Current Time: Thu Mar 28 17:33:21 GMT 2024

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

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

Back to the top