click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Malcolm Edgar (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CLK-606) common click core depends on Velocity
Date Wed, 03 Mar 2010 12:24:27 GMT

    [ https://issues.apache.org/jira/browse/CLK-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12840627#action_12840627
] 

Malcolm Edgar commented on CLK-606:
-----------------------------------

I agree we should probably work to remove this direct Velocity dependency from ClickServlet
and ErrorReport.

I think we need a TemplateException which can be used to wrap the Velocity ParseErrorException
and provide the equivalent properties: templateName, lineNumber, columnNumber

Anyone have a patch?

> common click core depends on Velocity
> -------------------------------------
>
>                 Key: CLK-606
>                 URL: https://issues.apache.org/jira/browse/CLK-606
>             Project: Click
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.1.0 RC1, 2.0.1
>         Environment: click-nodeps-2.1.0-RC1-incubating.jar , click-extras-2.1.0-RC1-incubating.jar,
ognl-2.6.9.jar, freemarket2.3.16.jar
>            Reporter: Andrey Rybin
>
> I use freemarker and dependencies in separate jars. 
> I haven't 'velocity' in my classpath.
> So I found bug: common click core depends on Velocity.
> Namely:
> org.apache.click.ClickServlet.java
> org.apache.click.util.ErrorReport.java
> They both depend on
> org.apache.velocity.exception.ParseErrorException   (search:
> instanceof ParseErrorException)
> and require Velocity be present in classpath even if freemarker are used.
> My workaround:
> I made fake public class ParseErrorException extends Exception {}.
> But you can make generic solution, for example:
> TemplateService
> + boolean isParseErrorException (Exception e)
> + Map<String, Object> describeParseErrorException (Exception e)
> or your own ClickTemplateException to wrap low level velocity/freemarker exceptions.

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


Mime
View raw message