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

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

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

查看: 4941|回复: 2

2.0一对多代码生成报错,而1.1没报错

[复制链接]
发表于 2019-5-24 14:56:11 | 显示全部楼层 |阅读模式
同一个数据库 同样三张表。是框架原生的
jeecg-boot-main order_customer order_ticket
在1.1没有报错,也可以两张表实现关联生成
但是在2.o就会有一下报错
虽然有报错,但是模型可以照常生成,但会导致后端启动不了

五月 24, 2019 12:07:03 下午 freemarker.log._JULLoggerFactory$JULLogger error
严重: Error executing FreeMarker template
FreeMarker template error:
The following has evaluated to null or missing:
==> subTab.originalForeignKeys  [in template "java/${bussiPackage}/${entityPackage}/mapper/xml/[1-n]Mapper.xml" at line 2, column 32]

----
Tip: It's the step after the last dot that caused this error, not those before it.
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
        - Failed at: #assign originalForeignKeys = subTab...  [in template "java/${bussiPackage}/${entityPackage}/mapper/xml/[1-n]Mapper.xml" at line 2, column 1]
----

Java stack trace (for programmers):
----
freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...]
        at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:134)
        at freemarker.core.Assignment.accept(Assignment.java:139)
        at freemarker.core.Environment.visit(Environment.java:366)
        at freemarker.core.IteratorBlock$IterationContext.executedNestedContentForCollOrSeqListing(IteratorBlock.java:317)
        at freemarker.core.IteratorBlock$IterationContext.executeNestedContent(IteratorBlock.java:271)
        at freemarker.core.IteratorBlock$IterationContext.accept(IteratorBlock.java:242)
        at freemarker.core.Environment.visitIteratorBlock(Environment.java:642)
        at freemarker.core.IteratorBlock.acceptWithResult(IteratorBlock.java:107)
        at freemarker.core.IteratorBlock.accept(IteratorBlock.java:93)
        at freemarker.core.Environment.visit(Environment.java:330)
        at freemarker.core.Environment.process(Environment.java:309)
        at freemarker.template.Template.process(Template.java:384)
        at org.jeecgframework.codegenerate.generate.util.b.a(FreemarkerHelper.java:85)
        at org.jeecgframework.codegenerate.generate.impl.a.a.a(BaseCodeGenerate.java:105)
        at org.jeecgframework.codegenerate.generate.impl.a.a.a(BaseCodeGenerate.java:75)
        at org.jeecgframework.codegenerate.generate.impl.a.a.a(BaseCodeGenerate.java:55)
        at org.jeecgframework.codegenerate.generate.impl.a.a.a(BaseCodeGenerate.java:39)
        at org.jeecgframework.codegenerate.generate.impl.CodeGenerateOneToMany.generateCodeFile(CodeGenerateOneToMany.java:174)
        at org.jeecg.JeecgOneToMainUtil.main(JeecgOneToMainUtil.java:63)

FreeMarker template error:
The following has evaluated to null or missing:
==> subTab.originalForeignKeys  [in template "java/${bussiPackage}/${entityPackage}/mapper/xml/[1-n]Mapper.xml" at line 2, column 32]

----
Tip: It's the step after the last dot that caused this error, not those before it.
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
        - Failed at: #assign originalForeignKeys = subTab...  [in template "java/${bussiPackage}/${entityPackage}/mapper/xml/[1-n]Mapper.xml" at line 2, column 1]
----

Java stack trace (for programmers):
----
freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...]
        at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:134)
        at freemarker.core.Assignment.accept(Assignment.java:139)
        at freemarker.core.Environment.visit(Environment.java:366)
        at freemarker.core.IteratorBlock$IterationContext.executedNestedContentForCollOrSeqListing(IteratorBlock.java:317)
        at freemarker.core.IteratorBlock$IterationContext.executeNestedContent(IteratorBlock.java:271)
        at freemarker.core.IteratorBlock$IterationContext.accept(IteratorBlock.java:242)
        at freemarker.core.Environment.visitIteratorBlock(Environment.java:642)
        at freemarker.core.IteratorBlock.acceptWithResult(IteratorBlock.java:107)
        at freemarker.core.IteratorBlock.accept(IteratorBlock.java:93)
        at freemarker.core.Environment.visit(Environment.java:330)
        at freemarker.core.Environment.process(Environment.java:309)
        at freemarker.template.Template.process(Template.java:384)
        at org.jeecgframework.codegenerate.generate.util.b.a(FreemarkerHelper.java:85)
        at org.jeecgframework.codegenerate.generate.impl.a.a.a(BaseCodeGenerate.java:105)
        at org.jeecgframework.codegenerate.generate.impl.a.a.a(BaseCodeGenerate.java:75)
        at org.jeecgframework.codegenerate.generate.impl.a.a.a(BaseCodeGenerate.java:55)
        at org.jeecgframework.codegenerate.generate.impl.a.a.a(BaseCodeGenerate.java:39)
        at org.jeecgframework.codegenerate.generate.impl.CodeGenerateOneToMany.generateCodeFile(CodeGenerateOneToMany.java:174)
        at org.jeecg.JeecgOneToMainUtil.main(JeecgOneToMainUtil.java:63)
发表于 2019-5-27 15:30:20 | 显示全部楼层
好像有点问题,升级下代码生成器版本
  1. <dependency>
  2.                         <groupId>org.jeecgframework.boot</groupId>
  3.                         <artifactId>codegenerate</artifactId>
  4.                         <version>1.0.5</version>
  5.                 </dependency>
复制代码
发表于 2019-5-28 16:25:49 | 显示全部楼层
你用的是online表单开发吗?
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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