[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.m2m] [ATL] Multiple source patterns

Dear all,
I'm trying to write an ATL transformation in which I have two source models (from different metamodels). The code I'm using is the following:


module ControlSystemGenDSMLTransformation; -- Module Template
create dvmCOOPN : COOPNMetaModel from dvm : GenericCospel, cfc : COOPNMetaModel;


rule init {
	
	from
		system : GenericCospel!System
	to
		coopnpackage: COOPNMetaModel!COOPNPackage(
			name <- system.name,	
			ownedModules <- system.ownedTypes
		)
}

rule ruleType {
	from
		t : GenericCospel!Type,
		c : COOPNMetaModel!COOPNPackage(c.name= 'cfc')

	to
		....
		....
}

If I comment the line "c : COOPNMetaModel!COOPNPackage(c.name= 'cfc')" everything works fine otherwise I've the following errors:
SEVERE: ****** BEGIN Stack Trace
SEVERE: exception:
SEVERE: null
java.lang.NullPointerException
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:301)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:338)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:171)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:143)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:101)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:240)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:171)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:143)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:101)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:240)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:171)
at org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:299)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.java:169)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.java:111)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.java:87)
at org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLauncher(AtlRegularVM.java:326)
at org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLauncher(AtlRegularVM.java:426)
at org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlRegularVM.java:398)
at org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDelegate.launch(AtlLaunchConfigurationDelegate.java:42)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:759)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:608)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:899)
at org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlugin.java:1102)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
SEVERE: A.main() : ??#22 null
SEVERE: local variables = {self=ControlSystemGenDSMLTransformation : ASMModule}
SEVERE: local stack = []
SEVERE: A.__matcher__() : ??#3 null
SEVERE: local variables = {self=ControlSystemGenDSMLTransformation : ASMModule}
SEVERE: local stack = []
SEVERE: A.__matchruleType() : ??#21 18:35-18:41
SEVERE: local variables = {self=ControlSystemGenDSMLTransformation : ASMModule, t=dvm!Fridge}
SEVERE: local stack = []
SEVERE: ****** END Stack Trace
INFO: Execution terminated due to error (see launch configuration to allow continuation after errors).
SEVERE: null
java.lang.RuntimeException
at org.eclipse.m2m.atl.engine.vm.SimpleDebugger.error(SimpleDebugger.java:195)
at org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(StackFrame.java:95)
at org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(StackFrame.java:87)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:173)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:143)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:101)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:240)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:171)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:143)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:101)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:240)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:171)
at org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:299)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.java:169)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.java:111)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.java:87)
at org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLauncher(AtlRegularVM.java:326)
at org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLauncher(AtlRegularVM.java:426)
at org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlRegularVM.java:398)
at org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDelegate.launch(AtlLaunchConfigurationDelegate.java:42)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:759)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:608)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:899)
at org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlugin.java:1102)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.lang.NullPointerException
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:301)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:338)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:171)
... 21 more



Any hint?

Thanks very much in advance,

Best regards,

Luis Pedro

p.s. In attachment the screenshot of my ATL configuration.

PNG image