You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by sunrays9 <su...@gmail.com> on 2008/03/14 09:50:42 UTC
Problem with Velocity 1.5 jar
Hi,
I got the following error, after updating the velocity 1.4 to 1.5 in my
application.
"org.apache.velocity.runtime.parser.ParseException: Encountered "<EOF>" "
Then i searched in google regarding this error, i got a the following info.
First thing, it is the problem with the multiline comments in template.
To resolve this issue, some one post the following method in that link
-- start
Apply this patch to file
src\java\org\apache\velocity\runtime\parser\node\NodeUtils.java :
public static String tokenLiteral( Token t )
{
String result;
// Issue: VELOCITY-580
// Marnix 2008-02-20: Look at kind of token and return "" when it's a
multiline comment
if (t.kind == ParserConstants.MULTI_LINE_COMMENT) {
result = "";
} else {
result = specialText( t ) + t.image;
}
return result;
}
--end
After i placed this method in NodeUtils.java and updated the velocity-1.5
jar.
Then i started testing again.
Now i am not getting any error.
My question is: is there any problem or side effects by updating the
velocity-1.5 jar at present or in future? or do we have any better solution
for this problem than the above solution?
Thanks,
Pawan
--
View this message in context: http://www.nabble.com/Problem-with-Velocity-1.5-jar-tp16046750p16046750.html
Sent from the Velocity - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org
Re: Problem with Velocity 1.5 jar
Posted by Nathan Bubna <nb...@gmail.com>.
So far this is the only solution that's been developed for this
problem. We hope to find a more robust solution before releasing
Velocity 1.6 though.
On Fri, Mar 14, 2008 at 1:50 AM, sunrays9 <su...@gmail.com> wrote:
>
> Hi,
>
> I got the following error, after updating the velocity 1.4 to 1.5 in my
> application.
> "org.apache.velocity.runtime.parser.ParseException: Encountered "<EOF>" "
>
> Then i searched in google regarding this error, i got a the following info.
> First thing, it is the problem with the multiline comments in template.
> To resolve this issue, some one post the following method in that link
> -- start
> Apply this patch to file
> src\java\org\apache\velocity\runtime\parser\node\NodeUtils.java :
> public static String tokenLiteral( Token t )
> {
> String result;
> // Issue: VELOCITY-580
> // Marnix 2008-02-20: Look at kind of token and return "" when it's a
> multiline comment
> if (t.kind == ParserConstants.MULTI_LINE_COMMENT) {
> result = "";
> } else {
> result = specialText( t ) + t.image;
> }
> return result;
> }
> --end
>
> After i placed this method in NodeUtils.java and updated the velocity-1.5
> jar.
> Then i started testing again.
> Now i am not getting any error.
>
> My question is: is there any problem or side effects by updating the
> velocity-1.5 jar at present or in future? or do we have any better solution
> for this problem than the above solution?
>
> Thanks,
> Pawan
>
>
> --
> View this message in context: http://www.nabble.com/Problem-with-Velocity-1.5-jar-tp16046750p16046750.html
> Sent from the Velocity - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org