https://bz.apache.org/bugzilla/show_bug.cgi?id=59939
Bug ID: 59939
Summary: NoSuchMethodException:
java.util.HashMap.get(java.lang.String)
Product: Tomcat 7
Version: 7.0.53
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Jasper
Assignee: [email protected]
Reporter: [email protected]
Our code is broken after upgrading Tomcat from 7.0.52 to 7.0.55 with exception
javax.el.MethodNotFoundException: java.lang.NoSuchMethodException:
java.util.HashMap.get(java.lang.String)
The JSP code is like this
<a:string id="${textMap.get(report)}"/>
'report' is a String, and 'textMap' is a Map. When invoking
textMap.get(report), ELResolver tries to find the get() method that exactly
matched the argument type. The get() method takes an Object in method signature
but 'report' argument is a String type. That results in the Exception.
Stacktrace:
Caused by: javax.el.MethodNotFoundException: java.lang.NoSuchMethodException:
java.util.HashMap.get(java.lang.String)
at javax.el.BeanELResolver.invoke(BeanELResolver.java:422)
at
org.apache.jasper.el.JasperELResolver.invoke(JasperELResolver.java:139)
at org.apache.el.parser.AstValue.getValue(AstValue.java:174)
at
org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184)
at
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:950)
at
org.apache.jsp.tag.web.reportSelector_tag._jspx_meth_aui_005fdropdownOption_005f0(reportSelector_tag.java:222)
at
org.apache.jsp.tag.web.reportSelector_tag._jspx_meth_c_005fforEach_005f0(reportSelector_tag.java:193)
at
org.apache.jsp.tag.web.reportSelector_tag._jspx_meth_aui_005fdropdown_005f0(reportSelector_tag.java:162)
at
org.apache.jsp.tag.web.reportSelector_tag.doTag(reportSelector_tag.java:126)
at
org.apache.jsp.tag.web.genericReport_tag._jspx_meth_vxa_005freportSelector_005f0(genericReport_tag.java:295)
at
org.apache.jsp.tag.web.genericReport_tag._jspx_meth_aui_005ffixedGridColumn_005f0(genericReport_tag.java:266)
at
org.apache.jsp.tag.web.genericReport_tag._jspx_meth_aui_005ffixedGridRow_005f0(genericReport_tag.java:231)
at
org.apache.jsp.tag.web.genericReport_tag.doTag(genericReport_tag.java:145)
at
org.apache.jsp.layouts.AraBasicDashboardLayout1_jsp._jspx_meth_vxa_005fgenericReport_005f0(AraBasicDashboardLayout1_jsp.java:169)
at
org.apache.jsp.layouts.AraBasicDashboardLayout1_jsp._jspService(AraBasicDashboardLayout1_jsp.java:133)
... 38 more
Caused by: java.lang.NoSuchMethodException:
java.util.HashMap.get(java.lang.String)
at java.lang.Class.getMethod(Class.java:1786)
at javax.el.BeanELResolver.invoke(BeanELResolver.java:419)
... 52 more }, RID=1ERZG1MHXPWD3PBNK67H
It was working in Tomcat 7.0.52 because 7.0.52 tries to find a random method
with the same name without considering the argument type. That caused problem
when there is method overload and was fixed in 7.0.53 here
https://bz.apache.org/bugzilla/show_bug.cgi?id=55483
This fix broke our code because now ELResolver tries to find a method exactly
matching the argument type.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]