Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » ATL: error in called rule
ATL: error in called rule [message #481125] Wed, 19 August 2009 16:54 Go to next message
venkatesh  is currently offline venkatesh Friend
Messages: 41
Registered: July 2009
Member
Hi i created a called rule like this

rule ldapMatchigrule(rul:PdmModel!LdapSyntaxType,rulename :String,oid
:String){
using{
sd: PdmModel!LdapSyntaxType=rul;
}
to ms: PdmModel!LdapMatchingRuleType(
name<-rulename,
ID<-oid
)
do{
thisModule.matchToAssign(ms,sd);
}
}



helper def: matchinghistory : Sequence(TupleType(e :
PdmModel!LdapMatchingRuleType,s :PdmModel!LdapSyntaxType)) =
Sequence {};

rule matchToAssign (e :
PdmModel!LdapMatchingRuleType,s:PdmModel!LdapSyntaxType) {
do {
thisModule.matchinghistory <- thisModule.matchinghistory->append(Tuple
{e = e});
}
}

but when i run this i'm getting error


SEVERE: ****** BEGIN Stack Trace
SEVERE: message: ERROR: get unsupported on OclAny.
SEVERE: A.main() : ??#737 null
SEVERE: local variables = {self=T_In2Out : ASMModule}
SEVERE: local stack = []
SEVERE: A.__exec__() : ??#8 null
SEVERE: local variables = {e=TransientLink {rule =
'LDMModel_2_PDMModel5', sourceElements = {v_left =
LdmMetaModelModel!<unnamed>}, targetElements = {attributeTypes =
PdmModelModel!Attributes, matichingRules = PdmModelModel!matchingrules,
v_right = PdmModelModel!<unnamed>, syntaxtype = PdmModelModel!Syntaxtypes,
typeModel = PdmModelModel!types Model}, variables = {}}, self=T_In2Out :
ASMModule}
SEVERE: local stack = []
SEVERE: A.__applyLDMModel_2_PDMModel5(1 : NTransientLink;) : ??#257
183:40-183:61
SEVERE: local variables = {v_right=PdmModelModel!<unnamed>,
v_left=LdmMetaModelModel!<unnamed>, rs=Tuple {oid =
'0.0.17.1218.127.13.2', rulename = 'caseIgnoreMatch'}, link=TransientLink
{rule = 'LDMModel_2_PDMModel5', sourceElements = {v_left =
LdmMetaModelModel!<unnamed>}, targetElements = {attributeTypes =
PdmModelModel!Attributes, matichingRules = PdmModelModel!matchingrules,
v_right = PdmModelModel!<unnamed>, syntaxtype = PdmModelModel!Syntaxtypes,
typeModel = PdmModelModel!types Model}, variables = {}}, self=T_In2Out :
ASMModule, matichingRules=PdmModelModel!matchingrules,
syntaxtype=PdmModelModel!Syntaxtypes,
attributeTypes=PdmModelModel!Attributes, typeModel=PdmModelModel!types
Model, e=LdmMetaModelModel!ddddd, res=Sequence {}, rs1=Tuple {oid =
'0.0.17.1218.127.13.2', rulename = 'caseIgnoreMatch'}}
SEVERE: local stack = [PdmModelModel!matchingrules,
PdmModelModel!matchingrules, T_In2Out : ASMModule, Sequence {}, T_In2Out :
ASMModule]
SEVERE: ****** END Stack Trace
INFO: Execution terminated due to error (see launch configuration to allow
continuation after errors).
SEVERE: ERROR: get unsupported on OclAny.
java.lang.RuntimeException: ERROR: get unsupported on OclAny.
at
org.eclipse.m2m.atl.engine.vm.SimpleDebugger.error(SimpleDeb ugger.java:185)
at
org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:85)
at
org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:81)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.get(ASMOcl Any.java:140)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:288)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:325)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:325)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
at
org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:289)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:155)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:105)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:81)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:351)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
at
org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:759)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
at
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
at
org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)


Please help me.

Thanks ,
venkatesh
Re: ATL: error in called rule [message #481133 is a reply to message #481125] Wed, 19 August 2009 17:12 Go to previous message
venkatesh  is currently offline venkatesh Friend
Messages: 41
Registered: July 2009
Member
Hi this is the rule

rule ldapMatchigrule(rulename :String,oid :String){
using{
ts:String =rulename;
}
to ms: PdmModel!LdapMatchingRuleType(
name<-rulename,
ID<-oid

)
do{
thisModule.matchToAssign(ms,ts);
}
}


helper def: matchinghistory : Sequence(TupleType(e :
PdmModel!LdapMatchingRuleType,s :String)) =
Sequence {};

rule matchToAssign (e : PdmModel!LdapMatchingRuleType,s:String) {
do {
thisModule.matchinghistory <- thisModule.matchinghistory->append(Tuple
{e = e,s=s});
}
}

it's giving the error:


SEVERE: ****** BEGIN Stack Trace
SEVERE: message: ERROR: could not find operation including on Module
having supertypes: [OclAny]
SEVERE: A.main() : ??#737 null
SEVERE: local variables = {self=T_In2Out : ASMModule}
SEVERE: local stack = []
SEVERE: A.__exec__() : ??#8 null
SEVERE: local variables = {e=TransientLink {rule =
'LDMModel_2_PDMModel5', sourceElements = {v_left =
LdmMetaModelModel!<unnamed>}, targetElements = {attributeTypes =
PdmModelModel!Attributes, matichingRules = PdmModelModel!matchingrules,
v_right = PdmModelModel!<unnamed>, syntaxtype = PdmModelModel!Syntaxtypes,
typeModel = PdmModelModel!types Model}, variables = {}}, self=T_In2Out :
ASMModule}
SEVERE: local stack = []
SEVERE: A.__applyLDMModel_2_PDMModel5(1 : NTransientLink;) : ??#260
182:6-195:6
SEVERE: local variables = {v_right=PdmModelModel!<unnamed>,
v_left=LdmMetaModelModel!<unnamed>, rs=Tuple {oid =
'0.0.17.1218.127.13.2', rulename = 'caseIgnoreMatch'}, link=TransientLink
{rule = 'LDMModel_2_PDMModel5', sourceElements = {v_left =
LdmMetaModelModel!<unnamed>}, targetElements = {attributeTypes =
PdmModelModel!Attributes, matichingRules = PdmModelModel!matchingrules,
v_right = PdmModelModel!<unnamed>, syntaxtype = PdmModelModel!Syntaxtypes,
typeModel = PdmModelModel!types Model}, variables = {}}, self=T_In2Out :
ASMModule, matichingRules=PdmModelModel!matchingrules,
syntaxtype=PdmModelModel!Syntaxtypes,
attributeTypes=PdmModelModel!Attributes, typeModel=PdmModelModel!types
Model, e=LdmMetaModelModel!ddddd, res=Sequence {}, rs1=Tuple {oid =
'0.0.17.1218.127.13.2', rulename = 'caseIgnoreMatch'}}
SEVERE: local stack = [PdmModelModel!matchingrules,
PdmModelModel!matchingrules]
SEVERE: ****** END Stack Trace
INFO: Execution terminated due to error (see launch configuration to allow
continuation after errors).
SEVERE: ERROR: could not find operation including on Module having
supertypes: [OclAny]
java.lang.RuntimeException: ERROR: could not find operation including on
Module having supertypes: [OclAny]
at
org.eclipse.m2m.atl.engine.vm.SimpleDebugger.error(SimpleDeb ugger.java:185)
at
org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:85)
at
org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:81)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:93)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:325)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:325)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
at
org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:289)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:155)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:105)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:81)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:351)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
at
org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:759)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
at
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
at
org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)



--------------------------------------

but when i write rule

rule ldapMatchigrule(rulename :String,oid :String){
using{
ts:String =rulename;
}
to ms: PdmModel!LdapMatchingRuleType(
name<-rulename,
ID<-oid

)
do{
ms;
}
}

it's working fine



Thanks
venkatesh
Previous Topic:[QVTO] Trying to make logging work
Next Topic:[ATL] invalid feature error
Goto Forum:
  


Current Time: Mon Jan 20 12:44:57 GMT 2025

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

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

Back to the top