1、错误描述

 六月 25, 2014 11:32:49 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error
 严重: Template processing error: "Macro select has no such argument: name"

 Macro select has no such argument: name
 The problematic instruction:
 ----------
 ==> macro select [on line 1, column 1 in inc/select.ftl]
  in user-directive items.select [on line 10, column 6 in address.ftl]
 ----------

 Java backtrace for programmers:
 ----------
 freemarker.template.TemplateException: Macro select has no such argument: name
     at freemarker.core.Environment.visit(Environment.java:576)
     at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
     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 com.you.freemarker.FreemarkerTemplate.printFile(FreemarkerTemplate.java:109)
     at com.you.test.freemarker.FreemarkerTest.studentFile(FreemarkerTest.java:260)
     at com.you.test.freemarker.FreemarkerTest.testSelect(FreemarkerTest.java:233)
     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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
     at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
     at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
     at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
     at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
     at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
     at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
     at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
     at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
     at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
     at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

 Macro select has no such argument: name
 The problematic instruction:
 ----------
 ==> macro select [on line 1, column 1 in inc/select.ftl]
  in user-directive items.select [on line 10, column 6 in address.ftl]
 ----------

 Java backtrace for programmers:
 ----------
 freemarker.template.TemplateException: Macro select has no such argument: name
     at freemarker.core.Environment.visit(Environment.java:576)
     at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
     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 com.you.freemarker.FreemarkerTemplate.printFile(FreemarkerTemplate.java:109)
     at com.you.test.freemarker.FreemarkerTest.studentFile(FreemarkerTest.java:260)
     at com.you.test.freemarker.FreemarkerTest.testSelect(FreemarkerTest.java:233)
     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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
     at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
     at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
     at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
     at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
     at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
     at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
     at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
     at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
     at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
     at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

2、错误原因

由于select定义中没有name属性<#macro select id>,但是在引用时出现name属性

<@items.select id="city" name="city"/>,导致出现错误

3、解决办法

在引用时,删掉name属性

<@items.select id="city"/>

异常-----freemarker.template.TemplateException: Macro select has no such argument的更多相关文章

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

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

  2. 异常-----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.错误描述 六月 26, 2014 11:26:27 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error 严重: Template proc ...

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

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

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

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

  5. 异常-----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 ...

  6. 异常-----freemarker.template.TemplateException

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

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

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

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

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

  9. cosbench 异常 FreeMarker template error: The following has evaluated to null or missing

    问题现象: 使用Cosbench 0.4.2.c4 版本测试Ceph RGW read test失败,遇到异常如下: FreeMarker template error: The following ...

随机推荐

  1. bzoj 4830: [Hnoi2017]抛硬币 [范德蒙德卷积 扩展lucas]

    4830: [Hnoi2017]抛硬币 题意:A投a次硬币,B投b次硬币,a比b正面朝上次数多的方案数,模\(10^k\). \(b \le a \le b+10000 \le 10^{15}, k ...

  2. BZOJ 4078: [Wf2014]Metal Processing Plant [放弃了]

    以后再也不做$World Final$的题了................ 还我下午 bzoj上TLE一次后就不敢交了然后去uva交 Claris太神了代码完全看不懂 还有一个代码uva上竟然WA了 ...

  3. NSIS 设置系统变量

    定义 ; include for some of the windows messages defines !include "winmessages.nsh" ; HKLM (a ...

  4. phpstudy如何安装景安ssl证书 window下apache服务器网站https访问

    1. 下载景安免费证书 https://www.zzidc.com/help/helpDetail?id=555 2.文件解压上传至服务器,位置自己决定 3. 调整apache配置 景安原文链接:ht ...

  5. 织梦去除tag标签url中的问号

    找到文件 include\taglib\tag.lib.php  大概87行 把 $row['link'] = $cfg_cmsurl."/tags.php?/".urlencod ...

  6. 洛谷P3369 【模板】普通平衡树(Treap/SBT)

    洛谷P3369 [模板]普通平衡树(Treap/SBT) 平衡树,一种其妙的数据结构 题目传送门 题目描述 您需要写一种数据结构(可参考题目标题),来维护一些数,其中需要提供以下操作: 插入x数 删除 ...

  7. 【Unity3D技术文档翻译】第1.1篇 AssetBundle 工作流

    译者前言:本章是关于从创建到加载,再到使用 AssetBundle 的整个流程的概述.阅读本章将对 AssetBundle 的工作流程有个简单而全面的了解. 本章原文所在章节:[Unity Manua ...

  8. Invoke 与 BeginInvoke 应用场景

    1.委托中 Invoke , BeginInvoke 特点 Invoke  : 同步调用 , 委托在当前线程执行 BeginInvoke : 异步调用 , 通常使用线程池资源执行委托. 2. UI  ...

  9. Mac下使用SSH(密钥)访问Github

    1,终端中输入:cd ~/.ssh 如果出现 -bash: cd: /Users/glamor/.ssh: No such file or directory,说明你之前没有用过.直接执行第二步. 如 ...

  10. linux shell 和linux 命令的区别?windows shell 和 windows 命令呢?

    shell翻译成壳的意思,它是包裹在linux内核外层的,一个可通过一系列的linux命令对操作系统发出相关指令的人机界面. shell可以通过其条件语句和循环语句等,把一系列linux命令结合在一起 ...