|
|
Re: executon of atl with java program :Problem with =loading BPMN resource [message #1792471 is a reply to message #1791916] |
Wed, 18 July 2018 11:20 |
José M. Álvarez-Palomo Messages: 3 Registered: July 2018 |
Junior Member |
|
|
Hi:
I am having the same problem with a BPMN model created with BPMN2Modeler, but using the model as an input for an Acceleo project in this case.
When I try to create a module file in the Acceleo project, the metamodels that the model is conformant to have to be added. The graphical interface allows to choose among the registered metamodels, including:
http ://www. omg. org/spec/BPMN/20100524/DI
http ://www. omg. org/spec/BPMN/20100524/DI-XMI
http ://www. omg. org/spec/BPMN/20100524/MODEL
http ://www. omg. org/spec/BPMN/20100524/MODEL-XMI
http ://www. omg. org/spec/DD/20100524/DC
http ://www. omg. org/spec/DD/20100524/DC-XMI
http ://www. omg. org/spec/DD/20100524/DI
http ://www. omg. org/spec/DD/20100524/DI-XMI
that were registered when BPMN2Modeler was installed.
If I try to choose the metamodels not ending in -XMI, the graphical interface does not add them to the module file and doesn't yield any error message. On the other hand, if I choose the metamodels ending in -XMI, they are added to the module file.
However, when I try to run an example (both an example of mine or the example base.bmpn provided by Gonzalo López) the execution fails with the same error message that Alijia Bouzidi gets:
Exception in thread "main" org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'definitions' is not found or is abstract. (file:/Users/jmalvarez/workspaces/photon-mod-dsl-workspace/org.eclipse.acceleo.gonzalo.lopez.sample/models/base.bpmn, 3, 541)
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.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:406)
at org.eclipse.acceleo.common.utils.ModelUtils.load(ModelUtils.java:391)
at org.eclipse.acceleo.common.utils.ModelUtils.load(ModelUtils.java:356)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.initialize(AbstractAcceleoGenerator.java:488)
at org.eclipse.acceleo.gonzalo.lopez.sample.common.Generate.<init>(Generate.java:90)
at org.eclipse.acceleo.gonzalo.lopez.sample.common.Generate.main(Generate.java:144)
Caused by: org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'definitions' is not found or is abstract. (file:/Users/jmalvarez/workspaces/photon-mod-dsl-workspace/org.eclipse.acceleo.gonzalo.lopez.sample/models/base.bpmn, 3, 541)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.validateCreateObjectFromFactory(XMLHandler.java:2298)
. . . many more lines
I have tried another approach, changing manually the metamodels in the module file, specifying the metamodels not ending in -XMI, but the same error happens.
I guess the underlying reason for the failure is the same than in Aljia Bouzidi's case with ATL.
I would like to clarify that I have chosen the above mentioned metamodels because they are referenced in the model file (see attached file) in the bpmn2:definitions element, in paticular the fields xmlns:xsi, xmlns:bpmn2, xmlns:bpmndi, xmlns:dc and xmlns:di, but I admit that I do not know if they are the metamodels that have to be referenced.
Thanks in advance for any help.
-
Attachment: base.bpmn
(Size: 1.83KB, Downloaded 207 times)
|
|
|
|
Re: executon of atl with java program :Problem with =loading BPMN resource [message #1792639 is a reply to message #1792587] |
Fri, 20 July 2018 12:02 |
José M. Álvarez-Palomo Messages: 3 Registered: July 2018 |
Junior Member |
|
|
Dear Gonzalo:
Thank you very much for your answer. I have been able to replicate to example and define a meaningless transformation (from BPMN to Families, the Families in the ATL tutorial first example):
-- @path BPMN2MM=/org.eclipse.atl.gonzalo.lopez.sample/BPMN20.ecore
-- @path FamiliesMM=/org.eclipse.atl.gonzalo.lopez.sample/Families.ecore
module bpmn2families;
create OUT : FamiliesMM from IN : BPMN2MM;
rule Definitions2Family {
from
s: BPMN2MM!Definitions (true)
to
t: FamiliesMM!Family (
lastName <- s.Name
)
}
However, the execution of that transformation on your base.bmpn model fails in the same way as in Acceleo:
Class 'definitions' is not found or is abstract. (file:/Users/jmalvarez/workspaces/photon-mod-dsl-workspace/org.eclipse.acceleo.gonzalo.lopez.sample/models/base.bpmn, 3, 541)
Thanks for your help.
[Updated on: Fri, 20 July 2018 12:04] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02047 seconds