.net中VM模板引擎使用报错 Encountered "<EOF>" 求解,在线等

异常详细信息: NVelocity.Runtime.Parser.ParseException: Encountered
"<EOF>" at line 21, column 2.
Was expecting one of:
   "("
...
   <RPAREN> ...
   <ESCAPE_DIRECTIVE>
...
   <SET_DIRECTIVE> ...
   "\\\\" ...
   "\\"
...
   <TEXT> ...
   <SINGLE_LINE_COMMENT> ...
   "*#"
...
   "*#" ...
   <STRING_LITERAL> ...
   <END>
...
   "if" ...
   "stop" ...
   <NUMBER_LITERAL>
...
   <WORD> ...
   <IDENTIFIER> ...
   <DOT>
...
   "{" ...
   "}" ...
堆栈跟踪:

[ParseException: Encountered "<EOF>" at line 21, column 2.
Was expecting one of:
    "(" ...
    <RPAREN> ...
    <ESCAPE_DIRECTIVE> ...
    <SET_DIRECTIVE> ...
    "\\\\" ...
    "\\" ...
    <TEXT> ...
    <SINGLE_LINE_COMMENT> ...
    "*#" ...
    "*#" ...
    <STRING_LITERAL> ...
    <END> ...
    "if" ...
    "stop" ...
    <NUMBER_LITERAL> ...
    <WORD> ...
    <IDENTIFIER> ...
    <DOT> ...
    "{" ...
    "}" ...
    ]
   NVelocity.Runtime.Parser.Parser.Parse(TextReader reader, String templateName) +257
   NVelocity.Runtime.RuntimeInstance.Parse(TextReader reader, String templateName, Boolean dumpNamespace) +321
   NVelocity.Runtime.RuntimeInstance.Parse(TextReader reader, String templateName) +71
   NVelocity.Template.Process() +249

[ParseErrorException: Encountered "<EOF>" at line 21, column 2.
Was expecting one of:
    "(" ...
    <RPAREN> ...
    <ESCAPE_DIRECTIVE> ...
    <SET_DIRECTIVE> ...
    "\\\\" ...
    "\\" ...
    <TEXT> ...
    <SINGLE_LINE_COMMENT> ...
    "*#" ...
    "*#" ...
    <STRING_LITERAL> ...
    <END> ...
    "if" ...
    "stop" ...
    <NUMBER_LITERAL> ...
    <WORD> ...
    <IDENTIFIER> ...
    <DOT> ...
    "{" ...
    "}" ...
    ]
   NVelocity.Template.Process() +573
   NVelocity.Runtime.Resource.ResourceManagerImpl.LoadResource(String resourceName, ResourceType resourceType, String encoding) +273
   NVelocity.Runtime.Resource.ResourceManagerImpl.GetResource(String resourceName, ResourceType resourceType, String encoding) +414
   NVelocity.Runtime.RuntimeInstance.GetTemplate(String name, String encoding) +81
   NVelocity.Runtime.RuntimeInstance.GetTemplate(String name) +104
   NVelocity.App.VelocityEngine.GetTemplate(String name) +71
   HZ.PortalSystem.WebFile.StaticPage.SpecialSectionVM.Center1.TemplateProduct(List`1 infolist) in F:\Emed Project\源代码\门户网站\HZ.PortalSystem.WebFile\StaticPage\SpecialSectionVM\Center1.cs:74
   HZ.PortalSystem.WebFile.AdminManage.InformationManage.SpecializedTopicsList.OperateCheckStatus(Int32 status) in F:\Emed Project\源代码\门户网站\HZ.PortalSystem.WebFile\AdminManage\InformationManage\Special\SpecializedTopicsList.aspx.cs:189
   HZ.PortalSystem.WebFile.AdminManage.InformationManage.SpecializedTopicsList.btnCheckOK_Click(Object sender, EventArgs e) in F:\Emed Project\源代码\门户网站\HZ.PortalSystem.WebFile\AdminManage\InformationManage\Special\SpecializedTopicsList.aspx.cs:149
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

烙印99
浏览 719回答 2
2回答

墨色风雨

肯定是哪里语法错误了 把你的VM文件贴出来看看吧

四季花海

在吗 你这个问题解决了没?
打开App,查看更多内容
随时随地看视频慕课网APP