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

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

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

查看: 5935|回复: 2

[Online开发] 我在打开有日期控件的编辑页面时报错

[复制链接]
发表于 2018-3-5 13:03:52 | 显示全部楼层 |阅读模式
请问这是什么错,应该如何解决?
新增页面
QQ图片20180305125329.png

编辑页面
QQ图片20180305125326.png

异常错误
Expected method. data['${tableName}']['${po.field_name}']?if_exists?string evaluated instead to freemarker.template.SimpleScalar on line 246, column 207 in jeecg_teacher_info_update.
The problematic instruction:
----------
==> ${data['${tableName}']['${po.field_name}']?if_exists?string("yyyy-MM-dd")} [on line 246, column 205 in jeecg_teacher_info_update]
----------

Java backtrace for programmers:
----------
freemarker.template.TemplateException: Expected method. data['${tableName}']['${po.field_name}']?if_exists?string evaluated instead to freemarker.template.SimpleScalar on line 246, column 207 in jeecg_teacher_info_update.
        at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:136)
        at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:114)
        at freemarker.core.Expression.getAsTemplateModel(Expression.java:40)
        at freemarker.core.Expression.getStringValue(Expression.java:44)
        at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
        at freemarker.core.Environment.visit(Environment.java:221)
        at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
        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.IfBlock.accept(IfBlock.java:82)
        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.IteratorBlock$Context.runLoop(IteratorBlock.java:179)
        at freemarker.core.Environment.visit(Environment.java:428)
        at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
        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.web.cgform.controller.build.CgFormBuildController.getTableTemplate(CgFormBuildController.java:280)
        at org.jeecgframework.web.cgform.controller.build.CgFormBuildController.ftlForm(CgFormBuildController.java:220)
        at org.jeecgframework.web.cgform.controller.build.CgFormBuildController.goUpdate(CgFormBuildController.java:79)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:747)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:676)
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.jeecgframework.core.aop.GZipFilter.doFilter(GZipFilter.java:119)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:140)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
发表于 2018-3-5 13:39:39 | 显示全部楼层
数据转换有问题  不能转换成freemarker认可的格式, 看看数据库的数据是否是日期格式的
 楼主| 发表于 2018-3-5 14:00:32 | 显示全部楼层
fly1206 发表于 2018-3-5 13:39
数据转换有问题  不能转换成freemarker认可的格式, 看看数据库的数据是否是日期格式的 ...

多谢帮助,我调试了下,的确是你说的原因。谢谢。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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