You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Jet Ma (JIRA)" <de...@velocity.apache.org> on 2010/09/28 03:55:33 UTC

[jira] Created: (VELOCITY-779) parse #[[#foreach()]]# error

parse #[[#foreach()]]# error
----------------------------

                 Key: VELOCITY-779
                 URL: https://issues.apache.org/jira/browse/VELOCITY-779
             Project: Velocity
          Issue Type: Bug
          Components: Engine
    Affects Versions: 1.6.4
            Reporter: Jet Ma


The following VTL

#[[#foreach()]]#

It should be:

#foreach()

but exception  :

org.apache.velocity.exception.ParseErrorException: Encountered "<EOF>" at /purchase/print/inQueryPrint.vm[line 30, column 18]
Was expecting one of:
    "(" ...
    <RPAREN> ...
    <ESCAPE_DIRECTIVE> ...
    <SET_DIRECTIVE> ...
    "##" ...
    "\\\\" ...
    "\\" ...
    <TEXT> ...
    "*#" ...
    "*#" ...
    <STRING_LITERAL> ...
    <END> ...
    <IF_DIRECTIVE> ...
    <STOP_DIRECTIVE> ...
    <INTEGER_LITERAL> ...
    <FLOATING_POINT_LITERAL> ...
    <WORD> ...
    <BRACKETED_WORD> ...
    <IDENTIFIER> ...
    <DOT> ...
    "{" ...
    "}" ...
    
	at org.apache.velocity.Template.process(Template.java:141)
	at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:446)
	at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:354)
	at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1400)
	at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1380)
	at org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:401)


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[jira] Resolved: (VELOCITY-779) parse #[[#foreach()]]# error

Posted by "Jarkko Viinamäki (JIRA)" <de...@velocity.apache.org>.
     [ https://issues.apache.org/jira/browse/VELOCITY-779?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jarkko Viinamäki resolved VELOCITY-779.
---------------------------------------

    Resolution: Invalid

Works fine on 1.7beta-1. Feature is not supported in 1.6.4

> parse #[[#foreach()]]# error
> ----------------------------
>
>                 Key: VELOCITY-779
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-779
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.6.4
>            Reporter: Jet Ma
>
> The following VTL
> #[[#foreach()]]#
> It should be:
> #foreach()
> but exception  :
> org.apache.velocity.exception.ParseErrorException: Encountered "<EOF>" at /purchase/print/inQueryPrint.vm[line 30, column 18]
> Was expecting one of:
>     "(" ...
>     <RPAREN> ...
>     <ESCAPE_DIRECTIVE> ...
>     <SET_DIRECTIVE> ...
>     "##" ...
>     "\\\\" ...
>     "\\" ...
>     <TEXT> ...
>     "*#" ...
>     "*#" ...
>     <STRING_LITERAL> ...
>     <END> ...
>     <IF_DIRECTIVE> ...
>     <STOP_DIRECTIVE> ...
>     <INTEGER_LITERAL> ...
>     <FLOATING_POINT_LITERAL> ...
>     <WORD> ...
>     <BRACKETED_WORD> ...
>     <IDENTIFIER> ...
>     <DOT> ...
>     "{" ...
>     "}" ...
>     
> 	at org.apache.velocity.Template.process(Template.java:141)
> 	at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:446)
> 	at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:354)
> 	at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1400)
> 	at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1380)
> 	at org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:401)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[jira] Commented: (VELOCITY-779) parse #[[#foreach()]]# error

Posted by "Jarkko Viinamäki (JIRA)" <de...@velocity.apache.org>.
    [ https://issues.apache.org/jira/browse/VELOCITY-779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916645#action_12916645 ] 

Jarkko Viinamäki commented on VELOCITY-779:
-------------------------------------------

This feature is only available in Velocity 1.7beta and newer versions. If you are using 1.6.4, it isn't even supposed to work.

> parse #[[#foreach()]]# error
> ----------------------------
>
>                 Key: VELOCITY-779
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-779
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.6.4
>            Reporter: Jet Ma
>
> The following VTL
> #[[#foreach()]]#
> It should be:
> #foreach()
> but exception  :
> org.apache.velocity.exception.ParseErrorException: Encountered "<EOF>" at /purchase/print/inQueryPrint.vm[line 30, column 18]
> Was expecting one of:
>     "(" ...
>     <RPAREN> ...
>     <ESCAPE_DIRECTIVE> ...
>     <SET_DIRECTIVE> ...
>     "##" ...
>     "\\\\" ...
>     "\\" ...
>     <TEXT> ...
>     "*#" ...
>     "*#" ...
>     <STRING_LITERAL> ...
>     <END> ...
>     <IF_DIRECTIVE> ...
>     <STOP_DIRECTIVE> ...
>     <INTEGER_LITERAL> ...
>     <FLOATING_POINT_LITERAL> ...
>     <WORD> ...
>     <BRACKETED_WORD> ...
>     <IDENTIFIER> ...
>     <DOT> ...
>     "{" ...
>     "}" ...
>     
> 	at org.apache.velocity.Template.process(Template.java:141)
> 	at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:446)
> 	at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:354)
> 	at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1400)
> 	at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1380)
> 	at org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:401)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org