代码生成错误
版本:3.7.6问题 代码生成时后台报错前台提示生成成功,而且生成的JSP文件内也会有错误信息:
部分错误代码:
freemarker.core.InvalidReferenceException: Expression po.dictTable is undefined on line 66, column 339 in naturebt\single\webapp\webpage\${bussiPackage}\${entityPackage}\${entityNameUncapFirst}-add.jspi.
at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:125)
at freemarker.core.Expression.getStringValue(Expression.java:118)
at freemarker.core.Expression.getStringValue(Expression.java:93)
at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.Environment.renderElementToString(Environment.java:1594)
at freemarker.core.StringLiteral.getStringValue(StringLiteral.java:101)
at freemarker.core.StringLiteral._getAsTemplateModel(StringLiteral.java:86)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
at freemarker.core.Environment.visit(Environment.java:568)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.IfBlock.accept(IfBlock.java:82)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:179)
at freemarker.core.Environment.visit(Environment.java:428)
at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.Environment.process(Environment.java:199)
at freemarker.template.Template.process(Template.java:259)
at org.jeecgframework.codegenerate.extcommon.FreemarkerHelper.processTemplate(FreemarkerHelper.java:79)
at org.jeecgframework.codegenerate.extcommon.BaseCodeExtCommonFactory.generateNewFileOrInsertIntoFile(BaseCodeExtCommonFactory.java:185)
at org.jeecgframework.codegenerate.extcommon.BaseCodeExtCommonFactory.executeGenerate(BaseCodeExtCommonFactory.java:116)
at org.jeecgframework.codegenerate.extcommon.BaseCodeExtCommonFactory.scanTemplatesAndProcess(BaseCodeExtCommonFactory.java:82)
at org.jeecgframework.codegenerate.extcommon.BaseCodeExtCommonFactory.generateFileCommon(BaseCodeExtCommonFactory.java:62)
at org.jeecgframework.codegenerate.extcommon.single.CgformCodeExtCommonFactory.generateFileCommon(CgformCodeExtCommonFactory.java:35)
at org.jeecgframework.codegenerate.extcommon.single.CgformCodeExtCommonFactory.invokeCommon(CgformCodeExtCommonFactory.java:76)
at org.jeecgframework.codegenerate.extcommon.single.CgformCodeExtCommonGenerate.generateToFile(CgformCodeExtCommonGenerate.java:176)
at org.jeecgframework.web.cgform.controller.generate.GenerateController.dogenerate(GenerateController.java:247)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Template processing error: "Expression po.dictTable is undefined on line 66, column 339 in naturebt\\single\\webapp\\webpage\\${bussiPackage}\\${entityPackage}\\${entityNameUncapFirst}-add.jspi."
Expression po.dictTable is undefined on line 66, column 339 in naturebt\single\webapp\webpage\${bussiPackage}\${entityPackage}\${entityNameUncapFirst}-add.jspi.
The problematic instruction:
----------
==> ${po.dictTable}
in user-directive dictInfo
----------
Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression po.dictTable is undefined on line 66, column 339 in naturebt\single\webapp\webpage\${bussiPackage}\${entityPackage}\${entityNameUncapFirst}-add.jspi.
at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:125)
at freemarker.core.Expression.getStringValue(Expression.java:118)
at freemarker.core.Expression.getStringValue(Expression.java:93)
at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.Environment.renderElementToString(Environment.java:1594)
at freemarker.core.StringLiteral.getStringValue(StringLiteral.java:101)
at freemarker.core.StringLiteral._getAsTemplateModel(StringLiteral.java:86)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
at freemarker.core.Environment.visit(Environment.java:568)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.IfBlock.accept(IfBlock.java:82)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:179)
at freemarker.core.Environment.visit(Environment.java:428)
at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.Environment.process(Environment.java:199)
at freemarker.template.Template.process(Template.java:259)
at org.jeecgframework.codegenerate.extcommon.FreemarkerHelper.processTemplate(FreemarkerHelper.java:79)
at org.jeecgframework.codegenerate.extcommon.BaseCodeExtCommonFactory.generateNewFileOrInsertIntoFile(BaseCodeExtCommonFactory.java:185)
at org.jeecgframework.codegenerate.extcommon.BaseCodeExtCommonFactory.executeGenerate(BaseCodeExtCommonFactory.java:116)
jsp内部错误:
<div class="form-group">
<label for="kpxm" class="col-sm-3 control-label">主要开票项目:</label>
<div class="col-sm-7">
<div class="input-group" style="width:100%">
<t:dictSelect field="kpxm" type="list" extendJson="{class:'form-control input-sm'}"
Expression po.dictTable is undefined on line 66, column 339 in naturebt\single\webapp\webpage\${bussiPackage}\${entityPackage}\${entityNameUncapFirst}-add.jspi.
The problematic instruction:
----------
==> ${po.dictTable}
in user-directive dictInfo
----------
Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression po.dictTable is undefined on line 66, column 339 in naturebt\single\webapp\webpage\${bussiPackage}\${entityPackage}\${entityNameUncapFirst}-add.jspi.
at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:125)
at freemarker.core.Expression.getStringValue(Expression.java:118)
at freemarker.core.Expression.getStringValue(Expression.java:93)
at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.Environment.renderElementToString(Environment.java:1594)
at freemarker.core.StringLiteral.getStringValue(StringLiteral.java:101)
at freemarker.core.StringLiteral._getAsTemplateModel(StringLiteral.java:86)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
at freemarker.core.Environment.visit(Environment.java:568)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.IfBlock.accept(IfBlock.java:82)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:179)
at freemarker.core.Environment.visit(Environment.java:428)
at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:221)
看常见问题贴 admin 发表于 2018-7-17 17:41 static/image/common/back.gif
看常见问题贴
不是一样的问题呀! http://www.jeecg.org/forum.php?mod=viewthread&tid=1830&extra=page%3D1
137 admin 发表于 2018-7-18 18:04 static/image/common/back.gif
http://www.jeecg.org/forum.php?mod=viewthread&tid=1830&extra=page%3D1
137
额! 模板文件在哪里 找不到!:L
页:
[1]