You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2017/03/05 10:12:20 UTC
[Bug 60820] New: ClassCastException in method request.getParameter
https://bz.apache.org/bugzilla/show_bug.cgi?id=60820
Bug ID: 60820
Summary: ClassCastException in method request.getParameter
Product: Tomcat 8
Version: 8.0.38
Hardware: PC
OS: Linux
Status: NEW
Severity: critical
Priority: P2
Component: Catalina
Assignee: dev@tomcat.apache.org
Reporter: vivek_nadar@yahoo.co.in
Target Milestone: ----
Hi,
We are getting the following exception stacktrace while calling getParameter
method in servlet request object,
java.lang.ClassCastException: java.lang.String cannot be cast to
[Ljava.lang.String; at
org.apache.catalina.core.ApplicationHttpRequest.getParameter(ApplicationHttpRequest.java:371)
at
javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:153)
Seeing the source code for tomcat 8.0.38 we see some changes to the
getParameter method. When the catalina code is doing parameter.get(name) the
return value is a String which is being taken in a String[] I see the
parseParameter() method call before this but is this a case that method fails
for some scenarios? The query parameter for which it is failing in
p=<someSimpleContiniousString> which in any case is not an Array. Please note,
we are running our application in liferay 6.2.14 and tomcat 8.0.38 in jdk 8.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 60820] ClassCastException in method request.getParameter
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60820
Vivek Nadar <vi...@yahoo.co.in> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vivek_nadar@yahoo.co.in
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 60820] ClassCastException in method request.getParameter
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60820
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Mark Thomas <ma...@apache.org> ---
The parameter map is Map<String,String[]> and if Tomcat was coded to put
anything other than String[] into the Map we'd see a compilation error - which
we don't.
The parameter map should be immutable but there are circumstances (bug 60808)
in which it can be manipulated.
It you can provide a simple test case that demonstrates this (it should be
possible with a single Servlet or JSP) then please feel free to re-open this
and provide that test case. If not, you may want to consider approaching
Liferay.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 60820] ClassCastException in method request.getParameter
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60820
--- Comment #2 from Mark Thomas <ma...@apache.org> ---
See also bug 58946.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org