You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Will Glass-Husain (JIRA)" <ji...@apache.org> on 2005/09/19 00:38:55 UTC
[jira] Updated: (VELOCITY-272) EOF exception when last line is commented out and has no new line at end
[ http://issues.apache.org/jira/browse/VELOCITY-272?page=all ]
Will Glass-Husain updated VELOCITY-272:
---------------------------------------
Bugzilla Id: (was: 29674)
Fix Version: 1.5
Description:
So if this is the last line of a template:
## something....<EOF>
Then we'll get an exception:
org.apache.velocity.exception.ParseErrorException: Lexical error:
org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 8,
column 110. Encountered: <EOF> after : ""
at org.apache.velocity.Template.process(Template.java:181)
at
org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:466)
at
org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:384)
at
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:814)
at org.apache.velocity.runtime.directive.Parse.render(Parse.java:196)
at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:153)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:109)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
was:
So if this is the last line of a template:
## something....<EOF>
Then we'll get an exception:
org.apache.velocity.exception.ParseErrorException: Lexical error:
org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 8,
column 110. Encountered: <EOF> after : ""
at org.apache.velocity.Template.process(Template.java:181)
at
org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:466)
at
org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:384)
at
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:814)
at org.apache.velocity.runtime.directive.Parse.render(Parse.java:196)
at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:153)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:109)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
Version: (was: 1.4)
Environment:
Operating System: other
Platform: Other
was:
Operating System: other
Platform: Other
Assign To: (was: Velocity-Dev List)
thanks for reporting this. we'll address this in upcoming 1.5
> EOF exception when last line is commented out and has no new line at end
> ------------------------------------------------------------------------
>
> Key: VELOCITY-272
> URL: http://issues.apache.org/jira/browse/VELOCITY-272
> Project: Velocity
> Type: Bug
> Components: Source
> Environment: Operating System: other
> Platform: Other
> Reporter: Zoltan Luspai
> Fix For: 1.5
>
> So if this is the last line of a template:
> ## something....<EOF>
> Then we'll get an exception:
> org.apache.velocity.exception.ParseErrorException: Lexical error:
> org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 8,
> column 110. Encountered: <EOF> after : ""
> at org.apache.velocity.Template.process(Template.java:181)
> at
> org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:466)
> at
> org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:384)
> at
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:814)
> at org.apache.velocity.runtime.directive.Parse.render(Parse.java:196)
> at
> org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:153)
> at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
> at
> org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:109)
> at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org