关注JEECG发展历程 关注最新动态和版本, 记录JEECG成长点滴 更新日志 - 技术支持 - 招聘英才

JEECG最新版本下载 JEECG智能开发平台 - 显著提高开发效率 常见问题 - 入门视频 - 参与开源团队

商务QQ: 69893005、418799587 商务热线(5*8小时): 010-64808099 官方邮箱: jeecgos@163.com

查看: 6347|回复: 4

[代码生成器] 代码生成错误

[复制链接]
发表于 2018-7-17 17:40:01 | 显示全部楼层 |阅读模式
版本:3.7.6
TIM截图20180717173227.png
问题 代码生成时后台报错  前台提示生成成功,而且生成的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)







[2018-07-17 17:32:33] [ERROR] [freemarker.runtime:96] 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} [on line 66, column 337 in naturebt\single\webapp\webpage\${bussiPackage}\${entityPackage}\${entityNameUncapFirst}-add.jspi]
in user-directive dictInfo [on line 66, column 315 in naturebt\single\webapp\webpage\${bussiPackage}\${entityPackage}\${entityNameUncapFirst}-add.jspi]
----------

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} [on line 66, column 337 in naturebt\single\webapp\webpage\${bussiPackage}\${entityPackage}\${entityNameUncapFirst}-add.jspi]
in user-directive dictInfo [on line 66, column 315 in naturebt\single\webapp\webpage\${bussiPackage}\${entityPackage}\${entityNameUncapFirst}-add.jspi]
----------

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)



发表于 2018-7-17 17:41:15 | 显示全部楼层
看常见问题贴
 楼主| 发表于 2018-7-18 17:59:28 | 显示全部楼层
admin 发表于 2018-7-17 17:41
看常见问题贴

不是一样的问题呀!
发表于 2018-7-18 18:04:10 | 显示全部楼层
 楼主| 发表于 2018-7-19 08:54:09 | 显示全部楼层
admin 发表于 2018-7-18 18:04
http://www.jeecg.org/forum.php?mod=viewthread&tid=1830&extra=page%3D1
137

额!   模板文件在哪里 找不到!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表