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

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

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

查看: 13212|回复: 1

[代码生成器] 代码生成器生成一对多代码,无法生成主表的jsp页面

[复制链接]
发表于 2018-8-7 18:50:09 | 显示全部楼层 |阅读模式
在online表单开发中设计了几张一对多的表,在点击生成代码时发现主表的list.jsp页面没有生成,打开页面显示如下代码:
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>

  3. Error reading included file multitable/onetomany/webapp/webpage/${bussiPackage}/${entityPackage}/../../ui/tdgColcb.ftl
  4. The problematic instruction:
  5. ----------
  6. ==> include "../../ui/tdgColcb.ftl" [on line 3, column 1 in multitable/onetomany/webapp/webpage/${bussiPackage}/${entityPackage}/${entityNameUncapFirst}-list.jspi]
  7. ----------

  8. Java backtrace for programmers:
  9. ----------
  10. freemarker.template.TemplateException: Error reading included file multitable/onetomany/webapp/webpage/${bussiPackage}/${entityPackage}/../../ui/tdgColcb.ftl
  11.         at freemarker.core.Include.accept(Include.java:167)
  12.         at freemarker.core.Environment.visit(Environment.java:221)
  13.         at freemarker.core.MixedContent.accept(MixedContent.java:92)
  14.         at freemarker.core.Environment.visit(Environment.java:221)
  15.         at freemarker.core.Environment.process(Environment.java:199)
  16.         at freemarker.template.Template.process(Template.java:259)
  17.         at org.jeecgframework.codegenerate.extcommon.FreemarkerHelper.processTemplate(FreemarkerHelper.java:79)
  18.         at org.jeecgframework.codegenerate.extcommon.BaseCodeExtCommonFactory.generateNewFileOrInsertIntoFile(BaseCodeExtCommonFactory.java:185)
  19.         at org.jeecgframework.codegenerate.extcommon.BaseCodeExtCommonFactory.executeGenerate(BaseCodeExtCommonFactory.java:116)
  20.         at org.jeecgframework.codegenerate.extcommon.BaseCodeExtCommonFactory.scanTemplatesAndProcess(BaseCodeExtCommonFactory.java:82)
  21.         at org.jeecgframework.codegenerate.extcommon.BaseCodeExtCommonFactory.generateFileCommon(BaseCodeExtCommonFactory.java:62)
  22.         at org.jeecgframework.codegenerate.extcommon.onetomany.CgformCodeOne2ManyExtCommonFactory.generateFileCommon(CgformCodeOne2ManyExtCommonFactory.java:36)
  23.         at org.jeecgframework.codegenerate.extcommon.onetomany.CgformCodeOne2ManyExtCommonFactory.invokeCommon(CgformCodeOne2ManyExtCommonFactory.java:77)
  24.         at org.jeecgframework.codegenerate.extcommon.onetomany.CgformCodeOne2ManyExtCommonGenerate.generateToFile(CgformCodeOne2ManyExtCommonGenerate.java:241)
  25.         at org.jeecgframework.web.cgform.controller.generate.GenerateController.dogenerateOne2Many(GenerateController.java:353)
  26.         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  27.         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  28.         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  29.         at java.lang.reflect.Method.invoke(Method.java:498)
  30.         at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
  31.         at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
  32.         at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
  33.         at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:747)
  34.         at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:676)
  35.         at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
  36.         at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)
  37.         at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
  38.         at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
  39.         at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)
  40.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
  41.         at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
  42.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
  43.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
  44.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  45.         at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
  46.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  47.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  48.         at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
  49.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  50.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  51.         at org.jeecgframework.core.aop.GZipFilter.doFilter(GZipFilter.java:113)
  52.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  53.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  54.         at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
  55.         at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  56.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  57.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  58.         at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150)
  59.         at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  60.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  61.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  62.         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
  63.         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
  64.         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
  65.         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
  66.         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
  67.         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
  68.         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
  69.         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
  70.         at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
  71.         at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
  72.         at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
  73.         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
  74.         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
  75.         at java.lang.Thread.run(Thread.java:748)
  76. Caused by: java.io.FileNotFoundException: Template multitable/onetomany/webapp/webpage/${bussiPackage}/${entityPackage}/../../ui/tdgColcb.ftl not found.
  77.         at freemarker.template.Configuration.getTemplate(Configuration.java:580)
  78.         at freemarker.core.Environment.getTemplateForInclusion(Environment.java:1490)
  79.         at freemarker.core.Include.accept(Include.java:157)
  80.         ... 64 more
复制代码
不知道有没有大佬碰到过这样的问题,烦请指点一二。
发表于 2018-8-7 19:06:59 | 显示全部楼层
第一步:修改下pom 把freeemarker引用改成
  1. <!-- freemarker -->
  2.                 <dependency>
  3.                     <groupId>org.freemarker</groupId>
  4.                     <artifactId>freemarker</artifactId>
  5.                     <version>${freemarker.version}</version>
  6.                     <scope>system</scope>
  7.                     <systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/freemarker-null-2.3.19.jar</systemPath>
  8.                 </dependency>
复制代码
第二步:把freemarker-null-2.3.19.jar放到项目src/main/webapp/WEB-INF/lib目录下
   freemarker-null-2.3.19.jar (910.15 KB, 下载次数: 10)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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