Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » executon of atl with java program :Problem with =loading BPMN resource(Program does not load a bpmn model)
executon of atl with java program :Problem with =loading BPMN resource [message #1791523] Sun, 01 July 2018 22:11 Go to next message
aljia bouzidi is currently offline aljia bouzidiFriend
Messages: 8
Registered: February 2017
Junior Member
Hi guys,
I try to execute an ATL program with a java class that aims to transform an bpmn model into an other model. The execution of the file .ATL is incorrectly executed but when I run the class java the following errors are appeared in the console:
org.eclipse.m2m.atl.core.ATLCoreException: Error loading Models/process_1.bpmn: org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'definitions' is not found or is abstract. (file:///C:/Users/Desktop/Nouveau%20dossier%20(5)/tuto1/Models/process_1.bpmn, 2, 370)
at org.eclipse.m2m.atl.core.emf.EMFInjector.inject(EMFInjector.java:70)
at org.eclipse.m2m.atl.core.emf.EMFInjector.inject(EMFInjector.java:84)
at com.BPMN2BPMNSUC.loadModels(BPMN2BPMNSUC.java:163)
at com.BPMN2BPMNSUC.main(BPMN2BPMNSUC.java:84)
Caused by: org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'definitions' is not found or is abstract. (file:///C:/Users/aljia/Desktop/Nouveau%20dossier%20(5)/tuto1/Models/process_1.bpmn, 2, 370)
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.m2m.atl.core.emf.EMFInjector.inject(EMFInjector.java:65)
... 3 more
Caused by: org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'definitions' is not found or is abstract. (file:///C:/Users/aljia/Desktop/Nouveau%20dossier%20(5)/tuto1/Models/process_1.bpmn, 2, 370)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.validateCreateObjectFromFactory(XMLHandler.java:2251)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.validateCreateObjectFromFactory(XMLHandler.java:2242)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1339)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1475)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:1026)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMIHandler.java:77)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:1008)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:719)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHandler.java:163)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:175)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:253)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1518)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1297)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
... 5 more



Any help pleaase
Re: executon of atl with java program :Problem with =loading BPMN resource [message #1791916 is a reply to message #1791523] Fri, 06 July 2018 22:01 Go to previous messageGo to next message
Gonzalo López is currently offline Gonzalo LópezFriend
Messages: 14
Registered: February 2018
Junior Member
Hi, I remember I had that problem but I dont remember how I solved it.

I attach an example that works, the transformation is simple but it doesnt fail.

I have the eclipse bpmn2 modeler plugin installed.

I provide an in model "base.bpmn", note that It doesn't have all the graphical stuff, its because it makes the transformation simpler and the eclipse bpmn modeler will create it for you once you open the output model.

I also provide the transformation, the output and the java class I use to run, you will have to adapt some stuff (paths, for example).

Hope it helps
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 Go to previous messageGo to next message
José M. Álvarez-Palomo is currently offline José M. Álvarez-PalomoFriend
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 14 times)
Re: executon of atl with java program :Problem with =loading BPMN resource [message #1792587 is a reply to message #1792471] Thu, 19 July 2018 22:03 Go to previous messageGo to next message
Gonzalo López is currently offline Gonzalo LópezFriend
Messages: 14
Registered: February 2018
Junior Member
Hi, I know nothing about Acceleo.
When I create the atl file I have the same options as you. I choose the "http ://www. omg. org/spec/BPMN/20100524/MODEL" and works correctly for me. Check attached images,

Let me know if I can help and if I have time I'll try to
  • Attachment: 1.PNG
    (Size: 10.26KB, Downloaded 23 times)
  • Attachment: 2.PNG
    (Size: 4.24KB, Downloaded 22 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 Go to previous messageGo to next message
José M. Álvarez-Palomo is currently offline José M. Álvarez-PalomoFriend
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

Re: executon of atl with java program :Problem with =loading BPMN resource [message #1794940 is a reply to message #1791523] Tue, 11 September 2018 12:07 Go to previous message
José M. Álvarez-Palomo is currently offline José M. Álvarez-PalomoFriend
Messages: 3
Registered: July 2018
Junior Member
Hi, Alija:

Were you able to find a solution to your problem?

Best regards.
Previous Topic:how to define rules with unique outputs?
Next Topic:Main thread of debugging terminated immediately
Goto Forum:
  


Current Time: Thu Nov 15 14:31:02 GMT 2018

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

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

Back to the top