1、错误描述

  1. 六月 26, 2014 11:26:27 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error
  2. 严重: Template processing error: "Expected collection or sequence. datas evaluated instead to freemarker.core.HashLiteral$SequenceHash on line 7, column 18 in inc/select.ftl."
  3.  
  4. Expected collection or sequence. datas evaluated instead to freemarker.core.HashLiteral$SequenceHash on line 7, column 18 in inc/select.ftl.
  5. The problematic instruction:
  6. ----------
  7. ==> list datas as data [on line 7, column 11 in inc/select.ftl]
  8. in user-directive items.select [on line 14, column 6 in address.ftl]
  9. ----------
  10.  
  11. Java backtrace for programmers:
  12. ----------
  13. freemarker.template.TemplateException: Expected collection or sequence. datas evaluated instead to freemarker.core.HashLiteral$SequenceHash on line 7, column 18 in inc/select.ftl.
  14. at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:136)
  15. at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:190)
  16. at freemarker.core.Environment.visit(Environment.java:428)
  17. at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
  18. at freemarker.core.Environment.visit(Environment.java:221)
  19. at freemarker.core.MixedContent.accept(MixedContent.java:92)
  20. at freemarker.core.Environment.visit(Environment.java:221)
  21. at freemarker.core.Macro$Context.runMacro(Macro.java:172)
  22. at freemarker.core.Environment.visit(Environment.java:614)
  23. at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
  24. at freemarker.core.Environment.visit(Environment.java:221)
  25. at freemarker.core.MixedContent.accept(MixedContent.java:92)
  26. at freemarker.core.Environment.visit(Environment.java:221)
  27. at freemarker.core.Environment.process(Environment.java:199)
  28. at freemarker.template.Template.process(Template.java:259)
  29. at com.you.freemarker.FreemarkerTemplate.printFtl(FreemarkerTemplate.java:77)
  30. at com.you.test.freemarker.FreemarkerTest.studentPrint(FreemarkerTest.java:267)
  31. at com.you.test.freemarker.FreemarkerTest.testSelect(FreemarkerTest.java:253)
  32. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  33. at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  34. at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  35. at java.lang.reflect.Method.invoke(Unknown Source)
  36. at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
  37. at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
  38. at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
  39. at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
  40. at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
  41. at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
  42. at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
  43. at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
  44. at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
  45. at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
  46. at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
  47. at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
  48. at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
  49. at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
  50. at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
  51. at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
  52. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
  53. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
  54. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
  55. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
  56.  
  57. <html>
  58. <head>
  59. <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  60. <title>freemarker 下拉框</title>
  61.  
  62. </head>
  63.  
  64. <body>
  65. <select id="city" name="city">
  66. <option>---请选择---</option>
  67. <option value="武汉市">武汉市</option>
  68. <option value="黄石市">黄石市</option>
  69. <option value="黄冈市">黄冈市</option>
  70. <option value="荆州市">荆州市</option>
  71. </select>
  72. <select id="zhuanye" name="zhuanye">
  73. <option>---请选择---</option>
  74. <option value="请选择专业">请选择专业</option>
  75. <option value="计算机科学与技术" selected>计算机科学与技术</option>
  76. <option value="物流工程">物流工程</option>
  77. <option value="英语专业">英语专业</option>
  78. </select>
  79. <select id="user" name="user">
  80. <option>---请选择---</option>
  81. <option value="1">张三丰</option>
  82. <option value="2">李思思</option>
  83. <option value="3">赵武</option>
  84. <option value="4">刘雪</option>
  85. <option value="5">朱顾</option>
  86. <option value="6">赵武</option>
  87. <option value="7">吴语</option>
  88. <option value="8">血玉</option>
  89. </select>
  90. <select id="username" name="username">
  91. <option>---请选择---</option>
  92. <option value="0">其他</option>
  93. <option value="1">张三丰</option>
  94. <option value="2">李思思</option>
  95. <option value="3">赵武</option>
  96. <option value="4">刘雪</option>
  97. <option value="5">朱顾</option>
  98. <option value="6">赵武</option>
  99. <option value="7">吴语</option>
  100. <option value="8">血玉</option>
  101. </select>
  102. <select id="sex" name="sex">
  103. <option>---请选择---</option>
  104.  
  105. Expected collection or sequence. datas evaluated instead to freemarker.core.HashLiteral$SequenceHash on line 7, column 18 in inc/select.ftl.
  106. The problematic instruction:
  107. ----------
  108. ==> list datas as data [on line 7, column 11 in inc/select.ftl]
  109. in user-directive items.select [on line 14, column 6 in address.ftl]
  110. ----------
  111.  
  112. Java backtrace for programmers:
  113. ----------
  114. freemarker.template.TemplateException: Expected collection or sequence. datas evaluated instead to freemarker.core.HashLiteral$SequenceHash on line 7, column 18 in inc/select.ftl.
  115. at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:136)
  116. at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:190)
  117. at freemarker.core.Environment.visit(Environment.java:428)
  118. at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
  119. at freemarker.core.Environment.visit(Environment.java:221)
  120. at freemarker.core.MixedContent.accept(MixedContent.java:92)
  121. at freemarker.core.Environment.visit(Environment.java:221)
  122. at freemarker.core.Macro$Context.runMacro(Macro.java:172)
  123. at freemarker.core.Environment.visit(Environment.java:614)
  124. at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
  125. at freemarker.core.Environment.visit(Environment.java:221)
  126. at freemarker.core.MixedContent.accept(MixedContent.java:92)
  127. at freemarker.core.Environment.visit(Environment.java:221)
  128. at freemarker.core.Environment.process(Environment.java:199)
  129. at freemarker.template.Template.process(Template.java:259)
  130. at com.you.freemarker.FreemarkerTemplate.printFtl(FreemarkerTemplate.java:77)
  131. at com.you.test.freemarker.FreemarkerTest.studentPrint(FreemarkerTest.java:267)
  132. at com.you.test.freemarker.FreemarkerTest.testSelect(FreemarkerTest.java:253)
  133. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  134. at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  135. at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  136. at java.lang.reflect.Method.invoke(Unknown Source)
  137. at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
  138. at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
  139. at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
  140. at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
  141. at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
  142. at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
  143. at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
  144. at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
  145. at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
  146. at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
  147. at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
  148. at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
  149. at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
  150. at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
  151. at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
  152. at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
  153. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
  154. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
  155. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
  156. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
  157.  
  158. Expected collection or sequence. datas evaluated instead to freemarker.core.HashLiteral$SequenceHash on line 7, column 18 in inc/select.ftl.
  159. The problematic instruction:
  160. ----------
  161. ==> list datas as data [on line 7, column 11 in inc/select.ftl]
  162. in user-directive items.select [on line 14, column 6 in address.ftl]
  163. ----------
  164.  
  165. Java backtrace for programmers:
  166. ----------
  167. freemarker.template.TemplateException: Expected collection or sequence. datas evaluated instead to freemarker.core.HashLiteral$SequenceHash on line 7, column 18 in inc/select.ftl.
  168. at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:136)
  169. at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:190)
  170. at freemarker.core.Environment.visit(Environment.java:428)
  171. at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
  172. at freemarker.core.Environment.visit(Environment.java:221)
  173. at freemarker.core.MixedContent.accept(MixedContent.java:92)
  174. at freemarker.core.Environment.visit(Environment.java:221)
  175. at freemarker.core.Macro$Context.runMacro(Macro.java:172)
  176. at freemarker.core.Environment.visit(Environment.java:614)
  177. at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
  178. at freemarker.core.Environment.visit(Environment.java:221)
  179. at freemarker.core.MixedContent.accept(MixedContent.java:92)
  180. at freemarker.core.Environment.visit(Environment.java:221)
  181. at freemarker.core.Environment.process(Environment.java:199)
  182. at freemarker.template.Template.process(Template.java:259)
  183. at com.you.freemarker.FreemarkerTemplate.printFtl(FreemarkerTemplate.java:77)
  184. at com.you.test.freemarker.FreemarkerTest.studentPrint(FreemarkerTest.java:267)
  185. at com.you.test.freemarker.FreemarkerTest.testSelect(FreemarkerTest.java:253)
  186. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  187. at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  188. at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  189. at java.lang.reflect.Method.invoke(Unknown Source)
  190. at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
  191. at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
  192. at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
  193. at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
  194. at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
  195. at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
  196. at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
  197. at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
  198. at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
  199. at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
  200. at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
  201. at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
  202. at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
  203. at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
  204. at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
  205. at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
  206. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
  207. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
  208. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
  209. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
  210. 六月 26, 2014 11:26:27 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error
  211. 严重: Template processing error: "Expected collection or sequence. datas evaluated instead to freemarker.core.HashLiteral$SequenceHash on line 7, column 18 in inc/select.ftl."
  212.  
  213. Expected collection or sequence. datas evaluated instead to freemarker.core.HashLiteral$SequenceHash on line 7, column 18 in inc/select.ftl.
  214. The problematic instruction:
  215. ----------
  216. ==> list datas as data [on line 7, column 11 in inc/select.ftl]
  217. in user-directive items.select [on line 14, column 6 in address.ftl]
  218. ----------
  219.  
  220. Java backtrace for programmers:
  221. ----------
  222. freemarker.template.TemplateException: Expected collection or sequence. datas evaluated instead to freemarker.core.HashLiteral$SequenceHash on line 7, column 18 in inc/select.ftl.
  223. at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:136)
  224. at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:190)
  225. at freemarker.core.Environment.visit(Environment.java:428)
  226. at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
  227. at freemarker.core.Environment.visit(Environment.java:221)
  228. at freemarker.core.MixedContent.accept(MixedContent.java:92)
  229. at freemarker.core.Environment.visit(Environment.java:221)
  230. at freemarker.core.Macro$Context.runMacro(Macro.java:172)
  231. at freemarker.core.Environment.visit(Environment.java:614)
  232. at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
  233. at freemarker.core.Environment.visit(Environment.java:221)
  234. at freemarker.core.MixedContent.accept(MixedContent.java:92)
  235. at freemarker.core.Environment.visit(Environment.java:221)
  236. at freemarker.core.Environment.process(Environment.java:199)
  237. at freemarker.template.Template.process(Template.java:259)
  238. at com.you.freemarker.FreemarkerTemplate.printFile(FreemarkerTemplate.java:109)
  239. at com.you.test.freemarker.FreemarkerTest.studentFile(FreemarkerTest.java:281)
  240. at com.you.test.freemarker.FreemarkerTest.testSelect(FreemarkerTest.java:254)
  241. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  242. at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  243. at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  244. at java.lang.reflect.Method.invoke(Unknown Source)
  245. at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
  246. at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
  247. at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
  248. at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
  249. at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
  250. at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
  251. at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
  252. at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
  253. at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
  254. at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
  255. at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
  256. at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
  257. at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
  258. at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
  259. at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
  260. at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
  261. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
  262. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
  263. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
  264. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
  265.  
  266. Expected collection or sequence. datas evaluated instead to freemarker.core.HashLiteral$SequenceHash on line 7, column 18 in inc/select.ftl.
  267. The problematic instruction:
  268. ----------
  269. ==> list datas as data [on line 7, column 11 in inc/select.ftl]
  270. in user-directive items.select [on line 14, column 6 in address.ftl]
  271. ----------
  272.  
  273. Java backtrace for programmers:
  274. ----------
  275. freemarker.template.TemplateException: Expected collection or sequence. datas evaluated instead to freemarker.core.HashLiteral$SequenceHash on line 7, column 18 in inc/select.ftl.
  276. at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:136)
  277. at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:190)
  278. at freemarker.core.Environment.visit(Environment.java:428)
  279. at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
  280. at freemarker.core.Environment.visit(Environment.java:221)
  281. at freemarker.core.MixedContent.accept(MixedContent.java:92)
  282. at freemarker.core.Environment.visit(Environment.java:221)
  283. at freemarker.core.Macro$Context.runMacro(Macro.java:172)
  284. at freemarker.core.Environment.visit(Environment.java:614)
  285. at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
  286. at freemarker.core.Environment.visit(Environment.java:221)
  287. at freemarker.core.MixedContent.accept(MixedContent.java:92)
  288. at freemarker.core.Environment.visit(Environment.java:221)
  289. at freemarker.core.Environment.process(Environment.java:199)
  290. at freemarker.template.Template.process(Template.java:259)
  291. at com.you.freemarker.FreemarkerTemplate.printFile(FreemarkerTemplate.java:109)
  292. at com.you.test.freemarker.FreemarkerTest.studentFile(FreemarkerTest.java:281)
  293. at com.you.test.freemarker.FreemarkerTest.testSelect(FreemarkerTest.java:254)
  294. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  295. at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  296. at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  297. at java.lang.reflect.Method.invoke(Unknown Source)
  298. at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
  299. at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
  300. at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
  301. at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
  302. at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
  303. at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
  304. at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
  305. at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
  306. at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
  307. at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
  308. at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
  309. at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
  310. at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
  311. at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
  312. at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
  313. at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
  314. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
  315. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
  316. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
  317. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

2、错误原因

期望的是集合或序列,但是给的是HashMap

3、解决办法

  1. <#macro select id datas value="" key="" text="" headKey="" headValue="">
  2. <select id="${id}" name="${id}">
  3. <option>---请选择---</option>
  4. <#if headKey!="">
  5. <option value="${headKey}">${headValue}</option>
  6. </#if>
  7. <#if datas?is_hash_ex>
  8. <#local keys=datas?keys/>
  9. <#list keys as key>
  10. <#if key==value>
  11. <option value="${key}" selected>${datas[key]}</option>
  12. <#else>
  13. <option value="${key}">${datas[key]}</option>
  14. </#if>
  15. </#list>
  16. <#else>
  17. <#list datas as data>
  18. <#if key!="">
  19. <#if value == data[key]?string>
  20. <option value="${data[key]}" selected>${data[text]}</option>
  21. <#else>
  22. <option value="${data[key]}">${data[text]}</option>
  23. </#if>
  24. <#else>
  25. <#if value == data>
  26. <option value="${data}" selected>${data}</option>
  27. <#else>
  28. <option value="${data}">${data}</option>
  29. </#if>
  30. </#if>
  31. </#list>
  32. </#if>
  33.  
  34. </select>
  35. </#macro>

异常-----freemarker.template.TemplateException: Expected collection or sequence. datas evaluated instead to freemarker.core.HashLiteral$SequenceHash on line 7, column 18 in inc/select.ftl.的更多相关文章

  1. 异常-----freemarker.template.TemplateException

    一,案例一 1.1.错误描述 五月 30, 2014 11:33:57 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error 严重: Templ ...

  2. 异常-----freemarker.template.TemplateException: The only legal comparisons are between two numbers, two strings, or two dates

    1.错误描述 六月 26, 2014 10:44:49 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error 严重: Template proc ...

  3. 异常-----freemarker.template.TemplateException: Macro select has no such argument

    1.错误描述 六月 25, 2014 11:32:49 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error 严重: Template proc ...

  4. 异常-----freemarker.template.TemplateException:Error executing macro:mainSelect

    1.错误描述 freemarker.template.TemplateException:Error executing macro:mainSelect require parameter:id i ...

  5. 异常-----freemarker.template.TemplateException: Error executing macro: write

    freemarker自定义标签 1.错误描述 六月 05, 2014 11:31:35 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error 严 ...

  6. freemarker.template.TemplateException:Error parsing including template

    1.错误描述 freemarker.template.TemplateException:Error parsing including template ftl/main.ftl:on line 6 ...

  7. freemarker.template.TemplateException:Macro has no such argument:params

    1.错误描述 freemarker.template.TemplateException:Macro mainSelect has no such argument:params 2.错误原因 在宏定 ...

  8. freemarker.template.TemplateException:Error executing macro:mainSelect

    1.错误描述 freemarker.template.TemplateException:Error executing macro:mainSelect require parameter:id i ...

  9. string evaluated instead to freemarker.template.SimpleScalar

    [2015-09-06 09:07:32.879] ERROR [6B68DD09CE6FECFE20936CA3C6D560AD:http-bio-8087-exec-8] o.a.s.v.free ...

随机推荐

  1. Win7 64位操作系统中搭建C/C++的编译环境

    通常使用IDE工具为 VS2010 .但是如果仅仅只是想在Windows中使用命令行对C/C++源码进行编译和运行.则需要使用 CL 命令方式或另外安装 Cygwin / MinWin 命令行编译器. ...

  2. PHP中的http协议

    PHP中的http协议 http协议基本组成 报文:用于Http协议交互的信息 请求行:包括请求的方法,URL和HTTP协议版本 状态行:包括响应结果的状态码,状态描述和Http版本 首部字段:包括请 ...

  3. shell实现go环境的部署搭建

    ##############################Deploy go enviroment######################## echo "start deploy g ...

  4. GitHub中开启二次验证Two-factor authentication,如何在命令行下更新和上传代码

    最近在使用GitHub管理代码,在git命令行管理代码时候遇到一些问题.如果开起了二次验证(Two-factor authentication两个要素认证),命令行会一直提示输入用户名和密码.查找了一 ...

  5. jq实现数字增加或者减少的动画

    效果图: 1.HTML: <div class="up"></div> <br> <div class="down"& ...

  6. 一个web应用的诞生(1)--初识flask

    基于flask的web应用的诞生 Flask是一个非常优秀的web框架,它最大的特点就是保持一个简单而易于扩展的小核心,其他的都有用户自己掌握,并且方便替换,甚至,你可以在社区看到众多开源的,可直接用 ...

  7. C++11 左值、右值、右值引用详解

    C++11 左值.右值.右值引用详解 左值.右值 在C++11中所有的值必属于左值.右值两者之一,右值又可以细分为纯右值.将亡值. 在C++11中可以取地址的.有名字的就是左值,反之,不能取地址的.没 ...

  8. vue学习问题总结(一)

    使用comopontent组件报错错误信息:vue.js:491 [Vue warn]: Unknown custom element: <todo-item> - did you reg ...

  9. static关键字的使用总结

    1.对于static关键字的使用的时候对于修饰变量的时候,它相当于一个全局变量: 2.对于static修饰一个函数的时候他是在类被加载的时候首先会被类加载,并且只能加载一次,并且这个方法可以不需要通过 ...

  10. 【阿里聚安全·安全周刊】科学家警告外星恶意代码|新方法任意解锁iPhone

    本周的七个关键词: 外星恶意代码 丨 任意解锁iPhone 丨  安卓9.0 丨 黑客攻击医疗设备 丨 仙女座僵尸网络 丨  苹果联合创始人被骗比特币 丨JavaScript -1-   [恶意代码] ...