日期:2014-05-19  浏览次数:20896 次

struts项目中遇到一个奇葩的问题
下面是异常信息,代码我看了半天没问题啊,求大家帮忙找下,谢谢!顺便祝大家新年快乐!


INFO: Server startup in 40686 ms
Hibernate: select eleccommon0_.comID as comID1_, eleccommon0_.stationRun as stationRun1_, eleccommon0_.devRun as devRun1_, eleccommon0_.createDate as createDate1_ from Elec_CommonMsg eleccommon0_ where 1=1
Hibernate: select eleccommon0_.comID as comID1_, eleccommon0_.stationRun as stationRun1_, eleccommon0_.devRun as devRun1_, eleccommon0_.createDate as createDate1_ from Elec_CommonMsg eleccommon0_ where 1=1
二月 08, 2013 5:12:34 下午 org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception

Error on line 26, column 13 in template/simple/dynamic-attributes.ftl
Expecting a string, date or number here, Expression parameters.dynamicAttributes[aKey] is instead a freemarker.ext.beans.SimpleMethodModel
The problematic instruction:
----------
==> ${parameters.dynamicAttributes[aKey]?html} [on line 26, column 11 in template/simple/dynamic-attributes.ftl]
 in include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" [on line 48, column 1 in template/simple/textarea.ftl]
----------

Java backtrace for programmers:
----------
freemarker.core.NonStringException: Error on line 26, column 13 in template/simple/dynamic-attributes.ftl
Expecting a string, date or number here, Expression parameters.dynamicAttributes[aKey] is instead a freemarker.ext.beans.SimpleMethodModel
at freemarker.core.Expression.getStringValue(Expression.java:126)
at freemarker.core.Expression.getStringValue(Expression.java:93)
at freemarker.core.StringBuiltins$StringBuiltIn._getAsTemplateModel(StringBuiltins.java:71)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
at freemarker.core.Expression.getStringValue(Expression.java:93)
at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
at freemarker.core.Environment.visit(Environment.java:209)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:209)
at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167)
at freemarker.core.Environment.visit(Environment.java:416)
at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
at freemarker.core.Environment.visit(Environment.java:209)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:209)
at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
at freemarker.core.Environment.visit(Environment.java:209)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:209)
at freemarker.core.Environment.include(Environment.java:1482)
at freemarker.core.Include.accept(Include.java:169)
at freemarker.core.Environment.visit(Environment.java:209)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:209)
at freemarker.core.Envir