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

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

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

查看: 7002|回复: 5

jeecg3.5 代码生成出现错误

[复制链接]
发表于 2015-3-14 18:58:23 | 显示全部楼层 |阅读模式
Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression packageStyle is undefined on line 1, column 6 in cgform_serviceImplTemplate.ftl.
        at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:125)
        at freemarker.core.ComparisonExpression.isTrue(ComparisonExpression.java:121)
        at freemarker.core.IfBlock.accept(IfBlock.java:80)
        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.generate.CgformCodeFactory.generateFile(CgformCodeFactory.java:79)
        at org.jeecgframework.codegenerate.generate.CgformCodeFactory.invoke(CgformCodeFactory.java:194)
        at org.jeecgframework.codegenerate.generate.CgformCodeGenerate.generateToFile(CgformCodeGenerate.java:217)
        at org.jeecgframework.web.cgform.controller.generate.GenerateController.dogenerate(GenerateController.java:168)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
        at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436)
        at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:140)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:119)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
        at java.lang.Thread.run(Thread.java:619)


请问怎么解决?
发表于 2015-3-18 09:33:17 | 显示全部楼层
这个是怎么操作的?
 楼主| 发表于 2015-3-18 13:32:42 | 显示全部楼层
是在这里出现的,我下的是  JEECG3.5.0 + MyEclipse2014 + SQL2008版本,用maven版的没这问题
QQ截图20150318132952.png
发表于 2015-3-21 17:10:48 | 显示全部楼层
遇到同样的问题。。。
发表于 2015-3-21 17:17:07 | 显示全部楼层
跟踪了一下,类GenerateController中,line 162行generateEntity的packageStyle属性是有值的。是不是jar文件:codegenerate-3.4.4_02需要更新呢?  packageStyle貌似是3.5版本新加的
 楼主| 发表于 2015-3-23 17:06:17 | 显示全部楼层
http://www.jeecg.org/forum.php?m ... 2360&extra=page%3D1
下载最新lib替换上去就ok了
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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