You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Nathan Bubna (JIRA)" <de...@velocity.apache.org> on 2008/12/03 19:01:44 UTC

[jira] Commented: (VELOCITY-651) Velocity 1.6 does not work with Struts MessageTool 1.4

    [ https://issues.apache.org/jira/browse/VELOCITY-651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652873#action_12652873 ] 

Nathan Bubna commented on VELOCITY-651:
---------------------------------------

Hmm.  Well, the actual method being called by $text.get('test1', ['TEST']) would be get(String, List), since [] creates an ArrayList, not an array.

Still, i'll look into this.  Can you get me more of the stack trace for that exception?

> Velocity 1.6 does not work with Struts MessageTool 1.4
> ------------------------------------------------------
>
>                 Key: VELOCITY-651
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-651
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.6
>         Environment: Velocity 1.6, Struts MessageTool 1.4, Struts 1.2.9, Java 1.6_10
>            Reporter: Stephan Schmid
>
> The org.apache.velocity.tools.struts.MessageTool of VelocityTools version 1.4 contains a method signature of String get(String key, Object args[]).
> With Velocity 1.5, one could use a Struts resource, such as
> test1=this is a {0}
> in a Velocity template with
> $text.get('test1', ['TEST'])
> that would render the text
> this is a TEST
> Unfortunately, since the released version 1.6 I get the following exception: 
> Invocation of method 'get' in class org.apache.velocity.tools.struts.MessageTool threw exception java.lang.IllegalArgumentException: wrong number of arguments at .. 
> The setting of the property runtime.references.strict has no influence.

-- 
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