freemarker.template.TemplateModelException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • No-PPT | 非常演示
    via by Unknown author,
    • freemarker.template.TemplateModelException: [... Exception message was already printed; see it above ...] at freemarker.ext.jsp.SimpleTagDirectiveModel.execute(SimpleTagDirectiveModel.java:104) at freemarker.core.Environment.visit(Environment.java:333) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:100) at freemarker.core.Environment.visit(Environment.java:257) at freemarker.core.MixedContent.accept(MixedContent.java:57) at freemarker.core.Environment.visit(Environment.java:257) at freemarker.core.Environment.process(Environment.java:235) at freemarker.template.Template.process(Template.java:262) at freemarker.ext.servlet.FreemarkerServlet.process(FreemarkerServlet.java:420) at freemarker.ext.servlet.FreemarkerServlet.doGet(FreemarkerServlet.java:359) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:800) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:595) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:191) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:72) at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265) at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228) at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:221) at org.apache.tiles.renderer.DefinitionRenderer.render(DefinitionRenderer.java:59) at org.springframework.web.servlet.view.tiles3.TilesView.renderMergedOutputModel(TilesView.java:132) at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1243) at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1027) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:971) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:968) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:859) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:844) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:800) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:497) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:313) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:626) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:546) at java.lang.Thread.run(Thread.java:745) Caused by: java.io.IOException: JSPException including path '/freemarker/production/list.ftl'. at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:61) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:125) at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188) at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132) at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299) at freemarker.ext.jsp.SimpleTagDirectiveModel.execute(SimpleTagDirectiveModel.java:90) ... 67 more Caused by: freemarker.core._MiscTemplateException: Can't compare values of these types. Allowed comparisons are between two numbers, two strings, two dates, or two booleans. Left hand operand is a string (wrapper: f.t.SimpleScalar). Right hand operand is a number (wrapper: f.t.SimpleNumber). The blamed expression: ==> (production.author) == 10001 [in template "freemarker/production/list.ftl" at line 51, column 44] ---- FTL stack trace ("~" means nesting-related): - Failed at: #if (production.author) == 10001 [in template "freemarker/production/list.ftl" at line 51, column 39] ---- at freemarker.core.EvalUtil.compare(EvalUtil.java:300) at freemarker.core.EvalUtil.compare(EvalUtil.java:112) at freemarker.core.ComparisonExpression.evalToBoolean(ComparisonExpression.java:65) at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:46) at freemarker.core.Environment.visit(Environment.java:257) at freemarker.core.MixedContent.accept(MixedContent.java:57) at freemarker.core.Environment.visitByHiddingParent(Environment.java:278) at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:157) at freemarker.core.Environment.visitIteratorBlock(Environment.java:501) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:67) at freemarker.core.Environment.visitByHiddingParent(Environment.java:278) at freemarker.core.IfBlock.accept(IfBlock.java:48) at freemarker.core.Environment.visit(Environment.java:257) at freemarker.core.MixedContent.accept(MixedContent.java:57) at freemarker.core.Environment.visit(Environment.java:257) at freemarker.core.Environment.process(Environment.java:235) at freemarker.template.Template.process(Template.java:262) at freemarker.ext.servlet.FreemarkerServlet.process(FreemarkerServlet.java:420) at freemarker.ext.servlet.FreemarkerServlet.doGet(FreemarkerServlet.java:359) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:800) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:595) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.java:115) at freemarker.ext.jsp.FreeMarkerPageContext.include(FreeMarkerPageContext.java:369) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123) ... 75 more
    No Bugmate found.