duriea 发表于 2019-5-24 14:56:11

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

同一个数据库 同样三张表。是框架原生的
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.originalForeignKeysMapper.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...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.originalForeignKeysMapper.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...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)

admin_jh9 发表于 2019-5-27 15:30:20

好像有点问题,升级下代码生成器版本<dependency>
                        <groupId>org.jeecgframework.boot</groupId>
                        <artifactId>codegenerate</artifactId>
                        <version>1.0.5</version>
                </dependency>

baron 发表于 2019-5-28 16:25:49

你用的是online表单开发吗?
页: [1]
查看完整版本: 2.0一对多代码生成报错,而1.1没报错