Skip to content

Transformation with my own metamodels #4

@DebianRDT

Description

@DebianRDT

I have a problem making transformations with my own metamodels. Specifically these are the traces that give me and the rule in which the error is jumping.

I have seen that, instead of my metamodel, you are using HSM as a metamodel and that is why you are causing errors. Any idea how to fix it?

org.eclipse.m2m.atl.engine.emfvm.VMException: Operation not found: OclUndefined.regexReplaceAll(java.lang.String,java.lang.String)
at stripFromXMIID#50(LoniPipeline2ASPm.atl[48:17-51:54])
local variables: self=LoniPipeline2ASPm : ASMModule, s=IN!BatchMode, name='id'
at createProp#70(LoniPipeline2ASPm.atl[99:3-99:49])
local variables: self=LoniPipeline2ASPm : ASMModule, s=IN!BatchMode, tuple=Tuple {attr = LoniPipeline!id, value = 'MigrateOptions1.BatchMode'}, t=OUT!x_id
at __applyInput#167(LoniPipeline2ASPm.atl[245:243-245:270])
local variables: self=LoniPipeline2ASPm : ASMModule, link=TransientLink {rule = Input, sourceElements = {s = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@4d19b1d (eClass: org.eclipse.emf.ecore.impl.EClassImpl@203eff45 (name: Input) (instanceClassName: null) (abstract: false, interface: false))}, targetElements = {t = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@5f62ade5 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@4144c106 (name: Node) (instanceClassName: null) (abstract: false, interface: false))}, variables = {}}, s=IN!BatchMode, t=OUT!x_Input, e=Tuple {attr = LoniPipeline!id, value = 'MigrateOptions1.BatchMode'}
at exec#88(LoniPipeline2ASPm.atl)
local variables: self=LoniPipeline2ASPm : ASMModule, e=TransientLink {rule = Input, sourceElements = {s = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@4d19b1d (eClass: org.eclipse.emf.ecore.impl.EClassImpl@203eff45 (name: Input) (instanceClassName: null) (abstract: false, interface: false))}, targetElements = {t = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@5f62ade5 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@4144c106 (name: Node) (instanceClassName: null) (abstract: false, interface: false))}, variables = {}}
at main#201(LoniPipeline2ASPm.atl)
local variables: self=LoniPipeline2ASPm : ASMModule

!ENTRY org.eclipse.core.jobs 4 2 2019-08-28 17:25:42.494
!MESSAGE An internal error occurred during: "Launching pipe".
!STACK 0
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.core.internal.resources.ResourceException: Resource '/HSM2SM22/models/1/1_fw/ModeloA.aspm.ecore' does not exist.
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 jtl.transformations.EmftextConverter.dispatchResource(EmftextConverter.java:115)
at jtl.transformations.EmftextConverter.doConvert(EmftextConverter.java:84)
at jtl.transformations.EmftextConverter.convert(EmftextConverter.java:56)
at jtl.launcher.AbstractJTLLauncher.emftextModelToText(AbstractJTLLauncher.java:598)
at jtl.launcher.AbstractExogenousLauncher.processSourceModel(AbstractExogenousLauncher.java:85)
at jtl.eclipse.AbstractEclipseExogenousLauncher.processSourceModel(AbstractEclipseExogenousLauncher.java:79)
at jtl.launcher.AbstractJTLLauncher.launch(AbstractJTLLauncher.java:199)
at jtl.eclipse.LaunchConfigurationDelegate.launch(LaunchConfigurationDelegate.java:123)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: org.eclipse.core.internal.resources.ResourceException: Resource '/HSM2SM22/models/1/1_fw/ModeloA.aspm.ecore' does not exist.
at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:335)
at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:209)
at org.eclipse.core.internal.resources.File.getContents(File.java:275)
at org.eclipse.core.internal.resources.File.getContents(File.java:268)
at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl$WorkbenchHelper.createPlatformResourceInputStream(PlatformResourceURIHandlerImpl.java:207)
at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl.createInputStream(PlatformResourceURIHandlerImpl.java:525)
at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:360)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1269)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
... 14 more

rule stripFromXMIID(s:HSM!EObject, name:String) {
do {
s.xmiID <- s.xmiID.split('-')
->select(str | str <> s.xmiID.split('-')
->select(s | s.contains(name + '_')).first())
->collect(s|'-' + s).sum().regexReplaceAll('^-','');
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions