tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Nicolucci <>
Subject Re: [Discussion]Problem passing parameters to a Method ( Looking for incorrect argument Type )
Date Fri, 23 Dec 2011 03:22:59 GMT
Thanks for your input!  I've actually figured out what I was missing.  I
had to also pull in the following fix:

With the above fix everything works as it does on Tomcat 7.0.23 ( I was
able to successfully execute my test on Tomcat).


Paul Nicolucci

             <knst.kolinko@gma                                          To 
   >                   Tomcat Users List                   
             12/22/2011 12:16                                           cc 
                                       Re: [Discussion]Problem passing     
             Please respond to         parameters to a Method ( Looking    
               "Tomcat Users           for incorrect argument Type )       

2011/12/22 Paul Nicolucci <>:
> Thanks for the response, I'll try to clarify as best I can and can
> a test case directly if needed ( since the mailing list strips
> sorry about that  I was unaware ).
> -We are experiencing this problem on Websphere Application Server V8
> included a snap shot of the org.apache.el code.
> - This problem only seems to happen after we pulled in the following fix
> for org.apache.el code :
> - It seems that if we try to pass a parameter using JSF to a method using
> the EL when using a value stored in a Map then we always look for a
> signature having Object type parameters since the MapELResolver.getType()
> always returns Object.class now.
> What further information can I provide?  Should I open a JIRA issue with
> more details and attach a test case there ?

1. If you can provide a simple sample application that demonstrates
the issue on a clean installation of Tomcat 7.0.23, then please open
an issue in Bugzilla and attach it there.
(So that we can fix it and a test to our testsuite).

2. Regarding BZ 51177 fix as far as I remember (without looking at
commit logs), the old code was looking up the actual type of element
contained in the map or in the list, which is just plainly wrong.
There is specification fragment cited in

Regarding your use case where target class contains no "foo(Object)"
method, from pure logic I would expect "foo(String)" to be found (if
it is the only candidate) and then a classcast to be attempted,  but I
would like to see some quote from specification (from PDFs or from
Javadoc) to support that.

A close match is from page #34 (48 of 130) of
expression_language-2_2-mrel-spec.pdf regarding BeanELResolver

For method resolution, the method string is the name of the method in
the bean. The parameter types can be
optionally specified to identify the method. If the parameter types
are not specified, the parameter objects are
used in the method resolution.

and page #38 (52 of 130)

The provided method object will first be coerced to a String. The
methods in the bean is then examined
and an attempt will be made to select one for invocation. If no
suitable can be found, a
MethodNotFoundException is thrown. If the given paramTypes is not
null, select the method with
the given name and parameter types. Else select the method with the
given name that has the same number
of parameters. If there are more than one such method, the method
selection process is undefined.

So the method name and the count of parameters is what matters.

Best regards,
Konstantin Kolinko

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message