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

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

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

查看: 14894|回复: 6

[代码生成器] Oline在线表单的代码生成BUG

[复制链接]
发表于 2018-7-5 12:54:32 | 显示全部楼层 |阅读模式
在使用3.7.6的Online在线开发的代码生成时报如下错误
表单编辑里面删除了原来默认的最后三个字段,自己添加了三个字段。
页面属性里面,自己添加的字段中有两个字段我选择的控件类型是下拉框
校验字典里面选择下拉框的两个字段对应的字典Code是数据字典里面的字典Code。
配置好后执行代码生成就报这个错。
  1. [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."

  2. Expression po.dictTable is undefined on line 66, column 339 in naturebt\single\webapp\webpage\${bussiPackage}\${entityPackage}\${entityNameUncapFirst}-add.jspi.
  3. The problematic instruction:
  4. ----------
  5. ==> ${po.dictTable} [on line 66, column 337 in naturebt\single\webapp\webpage\${bussiPackage}\${entityPackage}\${entityNameUncapFirst}-add.jspi]
  6. in user-directive dictInfo [on line 66, column 315 in naturebt\single\webapp\webpage\${bussiPackage}\${entityPackage}\${entityNameUncapFirst}-add.jspi]
  7. ----------

  8. Java backtrace for programmers:
  9. ----------
  10. freemarker.core.InvalidReferenceException: Expression po.dictTable is undefined on line 66, column 339 in naturebt\single\webapp\webpage\${bussiPackage}\${entityPackage}\${entityNameUncapFirst}-add.jspi.
  11.         at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:125)
  12.         at freemarker.core.Expression.getStringValue(Expression.java:118)
  13.         at freemarker.core.Expression.getStringValue(Expression.java:93)
  14.         at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
  15.         at freemarker.core.Environment.visit(Environment.java:221)
  16.         at freemarker.core.MixedContent.accept(MixedContent.java:92)
  17.         at freemarker.core.Environment.visit(Environment.java:221)
  18.         at freemarker.core.Environment.renderElementToString(Environment.java:1594)
  19.         at freemarker.core.StringLiteral.getStringValue(StringLiteral.java:101)
  20.         at freemarker.core.StringLiteral._getAsTemplateModel(StringLiteral.java:86)
  21.         at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
  22.         at freemarker.core.Environment.visit(Environment.java:568)
  23.         at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
  24.         at freemarker.core.Environment.visit(Environment.java:221)
  25.         at freemarker.core.MixedContent.accept(MixedContent.java:92)
  26.         at freemarker.core.Environment.visit(Environment.java:221)
  27.         at freemarker.core.IfBlock.accept(IfBlock.java:82)
  28.         at freemarker.core.Environment.visit(Environment.java:221)
  29.         at freemarker.core.MixedContent.accept(MixedContent.java:92)
  30.         at freemarker.core.Environment.visit(Environment.java:221)
  31.         at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:179)
  32.         at freemarker.core.Environment.visit(Environment.java:428)
  33.         at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
  34.         at freemarker.core.Environment.visit(Environment.java:221)
  35.         at freemarker.core.MixedContent.accept(MixedContent.java:92)
  36.         at freemarker.core.Environment.visit(Environment.java:221)
  37.         at freemarker.core.Environment.process(Environment.java:199)
  38.         at freemarker.template.Template.process(Template.java:259)
  39.         at org.jeecgframework.codegenerate.extcommon.FreemarkerHelper.processTemplate(FreemarkerHelper.java:79)
  40.         at org.jeecgframework.codegenerate.extcommon.BaseCodeExtCommonFactory.generateNewFileOrInsertIntoFile(BaseCodeExtCommonFactory.java:182)
  41.         at org.jeecgframework.codegenerate.extcommon.BaseCodeExtCommonFactory.executeGenerate(BaseCodeExtCommonFactory.java:113)
  42.         at org.jeecgframework.codegenerate.extcommon.BaseCodeExtCommonFactory.scanTemplatesAndProcess(BaseCodeExtCommonFactory.java:79)
  43.         at org.jeecgframework.codegenerate.extcommon.BaseCodeExtCommonFactory.generateFileCommon(BaseCodeExtCommonFactory.java:59)
  44.         at org.jeecgframework.codegenerate.extcommon.single.CgformCodeExtCommonFactory.generateFileCommon(CgformCodeExtCommonFactory.java:35)
  45.         at org.jeecgframework.codegenerate.extcommon.single.CgformCodeExtCommonFactory.invokeCommon(CgformCodeExtCommonFactory.java:76)
  46.         at org.jeecgframework.codegenerate.extcommon.single.CgformCodeExtCommonGenerate.generateToFile(CgformCodeExtCommonGenerate.java:176)
  47.         at org.jeecgframework.web.cgform.controller.generate.GenerateController.dogenerate(GenerateController.java:247)
  48.         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  49.         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  50.         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  51.         at java.lang.reflect.Method.invoke(Method.java:606)
  52.         at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
  53.         at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
  54.         at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
  55.         at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:747)
  56.         at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:676)
  57.         at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
  58.         at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)
  59.         at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
  60.         at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
  61.         at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)
  62.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
  63.         at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
  64.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
  65.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
  66.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  67.         at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  68.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
  69.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  70.         at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
  71.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
  72.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  73.         at org.jeecgframework.core.aop.GZipFilter.doFilter(GZipFilter.java:152)
  74.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
  75.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  76.         at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
  77.         at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  78.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
  79.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  80.         at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150)
  81.         at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  82.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
  83.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  84.         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
  85.         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
  86.         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
  87.         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
  88.         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
  89.         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
  90.         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
  91.         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
  92.         at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
  93.         at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
  94.         at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2517)
  95.         at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2506)
  96.         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  97.         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  98.         at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  99.         at java.lang.Thread.run(Thread.java:745)
复制代码
发表于 2018-7-5 13:16:02 | 显示全部楼层
老问题,手工判断下po.dictTable 为空
 楼主| 发表于 2018-7-5 14:26:44 | 显示全部楼层
admin 发表于 2018-7-5 13:16
老问题,手工判断下po.dictTable 为空

我是在点击代码生成,然后填写好包名后直接点击确定,就报错了,还没有生成成功代码呢。
 楼主| 发表于 2018-7-5 15:28:16 | 显示全部楼层
admin 发表于 2018-7-5 13:16
老问题,手工判断下po.dictTable 为空

管理,我需要怎么判断呢,麻烦指点一下,谢谢。
 楼主| 发表于 2018-7-5 17:03:51 | 显示全部楼层
admin 发表于 2018-7-5 13:16
老问题,手工判断下po.dictTable 为空

在oracle下面报错,但是在mysql 下面就正常,这是不是bug,在oracl下面时需要怎么修改,求指点,谢谢。
发表于 2018-7-5 19:39:28 | 显示全部楼层
 楼主| 发表于 2018-7-5 23:33:27 | 显示全部楼层
admin 发表于 2018-7-5 19:39
http://www.jeecg.org/forum.php?mod=viewthread&tid=5663&page=1

可以了,谢谢。还有另外一个问题是,在mysql下编辑表单,如果不更改字段的情况下点击确定,是不需要重新同步数据库的,如果是oracle下,点击编辑表单,什么都不改,直接点击确定,状态还是会变成未同步。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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