1、错误描述

 freemarker.core.ParseException: Encountered " " at line 14, column 12 in myself.ftl.
 Was expecting one of:
     <STRING_LITERAL> ...
     <RAW_STRING> ...
     "false" ...
     "true" ...
     <INTEGER> ...
     <DECIMAL> ...
     "." ...
     "+" ...
     "-" ...
     "!" ...
     "[" ...
     "(" ...
     "{" ...
     <ID> ...

     at freemarker.core.FMParser.generateParseException(FMParser.java:4702)
     at freemarker.core.FMParser.jj_consume_token(FMParser.java:4573)
     at freemarker.core.FMParser.UnaryExpression(FMParser.java:328)
     at freemarker.core.FMParser.MultiplicativeExpression(FMParser.java:440)
     at freemarker.core.FMParser.AdditiveExpression(FMParser.java:390)
     at freemarker.core.FMParser.RangeExpression(FMParser.java:561)
     at freemarker.core.FMParser.RelationalExpression(FMParser.java:516)
     at freemarker.core.FMParser.EqualityExpression(FMParser.java:481)
     at freemarker.core.FMParser.AndExpression(FMParser.java:590)
     at freemarker.core.FMParser.OrExpression(FMParser.java:613)
     at freemarker.core.FMParser.Expression(FMParser.java:226)
     at freemarker.core.FMParser.UnifiedMacroTransform(FMParser.java:1896)
     at freemarker.core.FMParser.FreemarkerDirective(FMParser.java:2404)
     at freemarker.core.FMParser.Content(FMParser.java:2623)
     at freemarker.core.FMParser.OptionalBlock(FMParser.java:2791)
     at freemarker.core.FMParser.Root(FMParser.java:2963)
     at freemarker.template.Template.<init>(Template.java:171)
     at freemarker.cache.TemplateCache.loadTemplate(TemplateCache.java:447)
     at freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:360)
     at freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:235)
     at freemarker.template.Configuration.getTemplate(Configuration.java:578)
     at freemarker.template.Configuration.getTemplate(Configuration.java:543)
     at com.you.freemarker.FreemarkerTemplate.getTemplate(FreemarkerTemplate.java:52)
     at com.you.freemarker.FreemarkerTemplate.printFtl(FreemarkerTemplate.java:76)
     at com.you.test.freemarker.FreemarkerTest.studentPrint(FreemarkerTest.java:217)
     at com.you.test.freemarker.FreemarkerTest.testMyself(FreemarkerTest.java:204)
     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、错误原因

<@ write/>

@write中间不能有空格

3、解决办法

删除空格,<@write/>

异常-----freemarker.core.ParseException: Encountered的更多相关文章

  1. 异常-----freemarker.core.ParseException: Encountered "string"

    1.错误描述 freemarker.core.ParseException: Encountered "string" at line 21, column 21 in type. ...

  2. 异常-----freemarker.core.ParseException: Token manager error

    一,案例一 1.1.错误描述 freemarker.core.ParseException: Token manager error: freemarker.core.TokenMgrError: L ...

  3. 异常-----freemarker.core.ParseException: Unexpected end of file reached

    freemarker自定义标签 1.错误描述 freemarker.core.ParseException: Unexpected end of file reached. at freemarker ...

  4. freemarker.core.ParseException:Unexpected end of file reached

    1.错误原因 freemarker.core.ParseException:Unexpected end of file reached 2.错误原因 由于在宏定义中,运用组件时没有关闭标签,导致出错 ...

  5. 异常-----freemarker.core.InvalidReferenceException问题解决

    案例一 1.1.错误描述 五月 28, 2014 9:56:48 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error 严重: Template ...

  6. 异常-----freemarker.core.NonStringException

    一,案例一 1.1.错误描述 <html> <head> <meta http-equiv="content-type" content=" ...

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

  8. 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 ...

  9. [mybatis错误] - sql出错 org.apache.ibatis.ognl.ParseException: Encountered "!" at line 1, column 15. Was expecting one of:

    完整异常:Caused by: org.apache.ibatis.builder.BuilderException: Error evaluating expression 'developerTy ...

随机推荐

  1. 【转】JavaScript的三种消息框alert,confirm,prompt

    1. alert是弹出警告框,在文本里面加入\n就可以换行.2. confirm弹出确认框,会返回布尔值,通过这个值可以判断点击时确认还是取消.true表示点击了确认,false表示点击了取消.3. ...

  2. WPF 圆角输入框

    今天打算来做一个圆角的输入框 默认输入框: 这个输入框不好看,并且在XP 跟 WIN 7  WIN10 效果 都不太一样 我们今天不用模板的方式,而是 最简单的方式 来实现 圆角 输入框: ----- ...

  3. 用es6的Array.reduce()方法计算一个字符串中每个字符出现的次数

    有一道经典的字符串处理的问题,统计一个字符串中每个字符出现的次数. 用es6的Array.reduce()函数配合“...”扩展符号可以更方便的处理该问题. s='abananbaacnncn' [. ...

  4. 修改Request 中的数据

    拦截器修改参数 今天一位网友开发中遇到一个需求,他需要在Request中修改传递过来的数据.开始的时候他在拦截器中修改,在拦截器中可以获取到从前台request中 传递过来的数据.他写法大致如下:自定 ...

  5. PLECS_直流电机基本系统模型

    1.模型图 2.模型仿真结果 (1)Step阶跃t=1s,R=20Ω,V_dc = 120V,那么此时 电源电压波形: 电机电枢电流波形: 电机电磁转矩: 电机转速波形: (2)其他参数不变将R=30 ...

  6. 阿里云 virtual memory exhausted: 无法分配内存

    在阿里云买了个云服务器,内存1G.编译php时出现下面的错误: virtual memory exhausted: Cannot allocate memory 问题原因:由于物理内存本身很小,且阿里 ...

  7. C# HelpPage 接口文档配置

    1.打开项目路径如下的类文件: 1.1.找类方法 Register 下的 config.SetDocumentationProvider 并取消注释,修改 ~/App_Data/XmlDocument ...

  8. Spring-Security 自定义Filter完成验证码校验

    Spring-Security的功能主要是由一堆Filter构成过滤器链来实现,每个Filter都会完成自己的一部分工作.我今天要做的是对UsernamePasswordAuthenticationF ...

  9. Yii2中后台用前台的代码设置验证码显示不出来?

    我说的是直接修改advanced模板.细心人会发现模板里在contact里有,登录也想要就仿照contact中的做法.前台好了,后台登录也要验证码,就把前台代码拿过来,可惜前后台的SiteContro ...

  10. PHP封装的一个单例模式Mysql操作类

    掌握满足单例模式的必要条件----三私一公. ①私有的构造方法-为了防止在类外使用new关键字实例化对象. ②私有的成员属性-为了防止在类外引入这个存放对象的属性. ③私有的克隆方法-为了防止在类外通 ...