Not sure what is the problem here; when adding the following email template to The Department

  define email approveRegistration(reg : Registration) {
    to("info@researchr.org")
    from("info@researchr.org")
    subject("Approve registration of " + reg.name)
    par{ "Please verify registration request of " output(reg.name) " for The Department"}
    par{ output(navigate(registration(reg))) }
  }

the compiler crashes during code generation wit the following trace:

     [exec] [ webdslc | info ] stage 9: code generationThis definition: Define([Template],"approveRegistration"{OriginalNameAnno("approve"{"approve6"})},[Arg("approveRegistration___reg6"{OriginalNameAnno("reg"{"approveRegistration___reg6"})},SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})],None,[IfTempl(ThisCall("gentemplatepredicate__0",[]){GlobalCallAnno,TypeAnno(SimpleSort("Bool"){DefValueAnno(False)})},[TemplateCall("section",[],[],TemplateBody([TemplateCall("header",[],[],TemplateBody([Text("Approved User Registration")])){[]},TemplateCall("form",[],[],TemplateBody([TemplateCall("table",[],[],TemplateBody([IfTempl(NotEq(FieldAccess(Var("approveRegistration___reg6"{OriginalNameAnno("reg"{"approveRegistration___reg6"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})},"username"){TypeAnno(SimpleSort("String"){DefValueAnno(String(""))})},Null{TypeAnno(SimpleSort("Null"))}){TypeAnno(SimpleSort("Bool"){DefValueAnno(False)})},[TemplateCall("row",[],[],TemplateBody([TemplateCall("label",[String("Username: "){TypeAnno(SimpleSort("String"){DefValueAnno(String(""))})}],[],TemplateBody([TemplateCall("text",[FieldAccess(Var("approveRegistration___reg6"{OriginalNameAnno("reg"{"approveRegistration___reg6"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})},"username"){TypeAnno(SimpleSort("String"){DefValueAnno(String(""))})}],[PropertyAssignment("class","outputusername"){TypeAnno(SimpleSort("Void"))}],TemplateBody([])){[]}])){InputNumber("input170"),[]}])){[]}],[]),IfTempl(NotEq(FieldAccess(Var("approveRegistration___reg6"{OriginalNameAnno("reg"{"approveRegistration___reg6"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})},"fullname"){TypeAnno(SimpleSort("String"){DefValueAnno(String(""))})},Null{TypeAnno(SimpleSort("Null"))}){TypeAnno(SimpleSort("Bool"){DefValueAnno(False)})},[TemplateCall("row",[],[],TemplateBody([TemplateCall("label",[String("Fullname: "){TypeAnno(SimpleSort("String"){DefValueAnno(String(""))})}],[],TemplateBody([TemplateCall("text",[FieldAccess(Var("approveRegistration___reg6"{OriginalNameAnno("reg"{"approveRegistration___reg6"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})},"fullname"){TypeAnno(SimpleSort("String"){DefValueAnno(String(""))})}],[PropertyAssignment("class","outputfullname"){TypeAnno(SimpleSort("Void"))}],TemplateBody([])){[]}])){InputNumber("input171"),[]}])){[]}],[]),IfTempl(NotEq(FieldAccess(Var("approveRegistration___reg6"{OriginalNameAnno("reg"{"approveRegistration___reg6"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})},"email"){TypeAnno(SimpleSort("Email"){DefValueAnno(String(""))})},Null{TypeAnno(SimpleSort("Null"))}){TypeAnno(SimpleSort("Bool"){DefValueAnno(False)})},[TemplateCall("row",[],[],TemplateBody([TemplateCall("label",[String("Email: "){TypeAnno(SimpleSort("String"){DefValueAnno(String(""))})}],[],TemplateBody([TemplateCall("text",[FieldAccess(Var("approveRegistration___reg6"{OriginalNameAnno("reg"{"approveRegistration___reg6"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})},"email"){TypeAnno(SimpleSort("Email"){DefValueAnno(String(""))})}],[PropertyAssignment("class","outputemail"){TypeAnno(SimpleSort("Void"))}],TemplateBody([])){[]}])){InputNumber("input172"),[]}])){[]}],[]),IfTempl(NotEq(FieldAccess(Var("approveRegistration___reg6"{OriginalNameAnno("reg"{"approveRegistration___reg6"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})},"message"){TypeAnno(SimpleSort("WikiText"){DefValueAnno(String(""))})},Null{TypeAnno(SimpleSort("Null"))}){TypeAnno(SimpleSort("Bool"){DefValueAnno(False)})},[TemplateCall("row",[],[],TemplateBody([TemplateCall("label",[String("Message: "){TypeAnno(SimpleSort("String"){DefValueAnno(String(""))})}],[],TemplateBody([TemplateCall("outputWikiText",[FieldAccess(Var("approveRegistration___reg6"{OriginalNameAnno("reg"{"approveRegistration___reg6"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})},"message"){TypeAnno(SimpleSort("WikiText"){DefValueAnno(String(""))})}],[PropertyAssignment("class","outputmessage"){TypeAnno(SimpleSort("Void"))}],TemplateBody([])){[]}])){InputNumber("input173"),[]}])){[]}],[])])){[]},TemplateCall("par",[],[],TemplateBody([TemplateCall("label",[String("Reason"){TypeAnno(SimpleSort("String"){DefValueAnno(String(""))})}],[],TemplateBody([TemplateCall("inputWikiText",[FieldAccess(Var("approveRegistration___reg6"{OriginalNameAnno("reg"{"approveRegistration___reg6"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})},"reason"){TypeAnno(SimpleSort("WikiText"){DefValueAnno(String(""))})}],[],TemplateBody([])){InputNumber("input175"),[]}])){InputNumber("input174"),[]}])){[]},TemplateCall("par",[],[],TemplateBody([TemplateCall("label",[String("Groups"){TypeAnno(SimpleSort("String"){DefValueAnno(String(""))})}],[],TemplateBody([Select("group32"{OriginalNameAnno("group3"{"group32"})},SimpleSort("Group"){EntityAnno("key","key",True),DefValueAnno(Null)},"Add Group",FieldAccess(Var("approveRegistration___reg6"{OriginalNameAnno("reg"{"approveRegistration___reg6"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})},"groups"){TypeAnno(GenericSort("Set",[SimpleSort("Group"){EntityAnno("key","key",True),DefValueAnno(Null)}]){DefValueAnno(TypedSetCreation(SimpleSort("Group"),[]))})},[],[]){InputNumber("input177")}])){InputNumber("input176"),[]}])){[]},IfTempl(ThisCall("genactionpredicatecombined50",[Var("approveRegistration___reg6"{OriginalNameAnno("reg"{"approveRegistration___reg6"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})},Var("approveRegistration___reg6"{OriginalNameAnno("reg"{"approveRegistration___reg6"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})}]){GlobalCallAnno,TypeAnno(SimpleSort("Bool"){DefValueAnno(False)})},[TemplateCall("action",[String("Approve"){TypeAnno(SimpleSort("String"){DefValueAnno(String(""))})},ThisCall("approveRegistration_inline_action33"{OriginalNameAnno("inline_action33"{"approveRegistration_inline_action33"})},[Var("approveRegistration___reg6"{OriginalNameAnno("reg"{"approveRegistration___reg6"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})}]){GlobalCallAnno,ActionCallArgsAnno([Var("approveRegistration___reg6")])}],[],TemplateBody([])){ActionNumber("action83"),[]}],[]),IfTempl(ThisCall("genactionpredicatecombined49",[Var("approveRegistration___reg6"{OriginalNameAnno("reg"{"approveRegistration___reg6"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})},Var("approveRegistration___reg6"{OriginalNameAnno("reg"{"approveRegistration___reg6"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})}]){GlobalCallAnno,TypeAnno(SimpleSort("Bool"){DefValueAnno(False)})},[TemplateCall("action",[String("Reject"){TypeAnno(SimpleSort("String"){DefValueAnno(String(""))})},ThisCall("approveRegistration_inline_action34"{OriginalNameAnno("inline_action34"{"approveRegistration_inline_action34"})},[Var("approveRegistration___reg6"{OriginalNameAnno("reg"{"approveRegistration___reg6"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})}]){GlobalCallAnno,ActionCallArgsAnno([Var("approveRegistration___reg6")])}],[],TemplateBody([])){ActionNumber("action84"),[]}],[])])){FormNumber("form169"),[]}])){[]},Action("approveRegistration_inline_action34"{OriginalNameAnno("inline_action34"{"approveRegistration_inline_action34"})},[Arg("approveRegistration___reg9"{OriginalNameAnno("reg"{"approveRegistration___reg9"})},SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})],Block([If(ThisCall("genactionpredicatecombined49",[Var("approveRegistration___reg6"{OriginalNameAnno("reg"{"approveRegistration___reg6"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})},Var("approveRegistration___reg9"{OriginalNameAnno("reg"{"approveRegistration___reg9"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})}]){GlobalCallAnno,TypeAnno(SimpleSort("Bool"){DefValueAnno(False)})},Block([Stat(Call(Var("approveRegistration___reg9"{OriginalNameAnno("reg"{"approveRegistration___reg9"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})},"reject",[]){TypeAnno(SimpleSort("Void"))})]),Block([GoTo(ThisCall("accessDenied"{OriginalNameAnno("accessDenied")},[]){GlobalCallAnno,TemplateArgsAnno([]),TypeAnno(SimpleSort("Page"))})]))])),Action("approveRegistration_inline_action33"{OriginalNameAnno("inline_action33"{"approveRegistration_inline_action33"})},[Arg("approveRegistration___reg10"{OriginalNameAnno("reg"{"approveRegistration___reg10"})},SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})],Block([If(ThisCall("genactionpredicatecombined50",[Var("approveRegistration___reg6"{OriginalNameAnno("reg"{"approveRegistration___reg6"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})},Var("approveRegistration___reg10"{OriginalNameAnno("reg"{"approveRegistration___reg10"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})}]){GlobalCallAnno,TypeAnno(SimpleSort("Bool"){DefValueAnno(False)})},Block([Stat(Call(Var("approveRegistration___reg10"{OriginalNameAnno("reg"{"approveRegistration___reg10"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})},"approve",[]){TypeAnno(SimpleSort("Void"))})]),Block([GoTo(ThisCall("accessDenied"{OriginalNameAnno("accessDenied")},[]){GlobalCallAnno,TemplateArgsAnno([]),TypeAnno(SimpleSort("Page"))})]))]))],[])]){TemplateClassName("approveRegistration_Template")}
     [exec] Prev definition: Define([Email],"approveRegistration"{OriginalNameAnno("approveRegistration"{"approveRegistration0"}),"approveRegistration0"},[Arg("reg4"{OriginalNameAnno("reg"{"reg4"})},SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})],None,[TemplateCall("to",[String("info@researchr.org"){TypeAnno(SimpleSort("String"){DefValueAnno(String(""))})}],[],TemplateBody([])){[]},TemplateCall("from",[String("info@researchr.org"){TypeAnno(SimpleSort("String"){DefValueAnno(String(""))})}],[],TemplateBody([])){[]},TemplateCall("subject",[Add(String("Approve registration of "){TypeAnno(SimpleSort("String"){DefValueAnno(String(""))})},FieldAccess(Var("reg4"{OriginalNameAnno("reg"{"reg4"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})},"name"){TypeAnno(SimpleSort("String"){DefValueAnno(String(""))})}){TypeAnno(SimpleSort("String"){DefValueAnno(String(""))})}],[],TemplateBody([])){[]},TemplateCall("par",[],[],TemplateBody([Text("Please verify registration request of "),TemplateCall("text",[FieldAccess(Var("reg4"{OriginalNameAnno("reg"{"reg4"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})},"name"){TypeAnno(SimpleSort("String"){DefValueAnno(String(""))})}],[],TemplateBody([])),Text(" for The Department")])){[]},TemplateCall("par",[],[],TemplateBody([TemplateCall("text",[ThisCall("navigate",[ThisCall("registration"{OriginalNameAnno("registration")},[Var("reg4"{OriginalNameAnno("reg"{"reg4"})}){TypeAnno(SimpleSort("Registration"){EntityAnno("id",None,False),DefValueAnno(Null)})}]){GlobalCallAnno,TemplateArgsAnno([Arg("reg"{"registrationRegistration___reg0"},SimpleSort("Registration"))]),TypeAnno(SimpleSort("Page"))}]){GlobalCallAnno,TypeAnno(SimpleSort("String"){DefValueAnno(String(""))})}],[],TemplateBody([]))])){[]}]){TemplateClassName("approveRegistration_Template")}
     [exec] webdslc: rewriting failed, trace:
     [exec] 	main_0_0
     [exec] 	webdslc_main_0_0
     [exec] 	xtc_io_wrap_5_0
     [exec] 	option_wrap_5_0
     [exec] 	lifted43
     [exec] 	xtc_io_1_0
     [exec] 	xtc_temp_files_1_0
     [exec] 	restore_always_2_0
     [exec] 	lifted31
     [exec] 	lifted4
     [exec] 	xtc_webdslc_0_0
     [exec] 	stage_1_1
     [exec] 	log_timed_1_1
     [exec] 	lifted11
     [exec] 	core_to_java_servlet_0_0
     [exec] 	log_time_1_1
     [exec] 	if_statistics_2_0
     [exec] 	generate_code_java_servlet_0_0
     [exec] 	generate_code_java_servlet_0_0
     [exec] 	generate_code_java_servlet_0_0
     [exec] 	generate_code_java_servlet_0_0
     [exec] 	generate_code_java_servlet_0_0
     [exec] 	generate_code_java_servlet_0_0
     [exec] 	generate_code_java_servlet_0_0
     [exec] 	dr_scope_1_1
     [exec] 	lifted763
     [exec] 	dr_scope_1_1
     [exec] 	lifted764
     [exec] 	dr_scope_1_1
     [exec] 	lifted765
     [exec] 	dr_scope_1_1
     [exec] 	lifted766
     [exec] 	dr_scope_1_1
     [exec] 	lifted767
     [exec] 	dr_scope_1_1
     [exec] 	lifted768
     [exec] 	dr_scope_1_1
     [exec] 	lifted769
     [exec] 	dr_scope_1_1
     [exec] 	lifted770
     [exec] 	scope_local_emit_1_0
     [exec] 	dr_scope_1_1
     [exec] 	lifted547
     [exec] 	dr_scope_1_1
     [exec] 	lifted548
     [exec] 	lifted774
     [exec] 	log_time_1_1
     [exec] 	if_statistics_2_0
     [exec] 	lifted775
     [exec] 	GenerateCodeJavaServlet_0_0
     [exec] 	log_time_1_1
     [exec] 	if_statistics_2_0
     [exec] 	data_validation_phase_0_0
     [exec] 	generate_java_servlet_template_partial_0_0
     [exec] 	emit_java_code_local_0_0
     [exec] 	fail_with_stacktrace_0_0
     [exec] [ webdslc | critical ] Internal error: with clause failed unexpectedly in strategy 'fail-with-stacktrace'
     [exec]            "Local emit for non-owned target: department.beans.approveRegistration_Template"
Submitted by Eelco Visser on 3 March 2010 at 15:38

On 3 March 2010 at 17:37 Nathan Bruning commented:

Email templates and normal templates were sharing the same namespace, but redefinitions were not checked.
This bug triggered an integrity check of the compiler, saying that code generation violates the (future) caching scheme.
Fixed with revision 3680.

Log in to post comments