Re: Application throwing ClassCast Exception while upgrading from tomcat 8.0.18 to tomcat 8.0.30
Thanks for your answer Konstantin !. I will re-verify the code. Adhavan.M On Sat, Jan 30, 2016 at 5:56 PM, Konstantin Kolinkowrote: > 2016-01-20 1:47 GMT+03:00 Mark Thomas : > > On 19/01/2016 16:37, Adhavan Mathiyalagan wrote: > >> Thanks Mark ! Please find my answer > >> > >> Figure out what is inserting something other than String[] as the value > >> into a Map instance. > >> > >> There are lot of places in Client we insert 'Integer' datatype (Also > >> other datatypes) .I fear that it is going to be more > >> tedious thing to identify and fix all the client code. > >> > >> Is there any other way or path forward to fix this ? (Like upgrading > the > >> displaytag version > >> which is currently 1.1) Or Is the modifying the Client Code is the only > >> path forward ? > > > > It depends. How are you inserting Integers into that Map? I'm trying to > > figure out if this is a client code bug or if the restriction that was > > added to Tomcat was overly strict and needs to be reverted. > > > > Looking for DisplayTag 1.1 source jar at Maven Central, it is a > rather old library. The latest version is 1.2 (released in 2008). > > 1.1 was released in 2006. Why OP haven't upgraded to 1.2 ? > > Web site: > http://www.displaytag.org/ > http://sourceforge.net/projects/displaytag/ > > That said, I do not see any obvious errors in that library. It creates > a copy of parameter map (DefaultRequestHelper.getParameterMap()). I do > not see it inserting any values into original map. I also do not see > it implementing a ServletRequestWrapper. > > So I think the error is not in the library, but in some other code. > > > I think the Tomcat code is OK. > > The official Servlet Specification javadoc says that the values in > ParameterMap are String[], and this requirement has to be enforced at > some point of time. Looking into Servlet 2.4 Javadoc (the spec > released in 2003, implemented by Tomcat 5.x) it says exactly the same. > [1][2] So a library released in year 2006 must follow it. > > > Regarding a technical way to insert incorrect parameters. In theory I > see two ways: > > 1. org.apache.catalina.core.ApplicationHttpRequest is a wrapper. The > wrapped request may be beyond our control, but it still has to follow > the spec. > > 2. The map returned by ApplicationHttpRequest class must be immutable > [2], but it is not enforced. I filed > https://bz.apache.org/bugzilla/show_bug.cgi?id=58946 > > > [1] > https://wiki.apache.org/tomcat/Specifications#Java_Servlet_Specifications > [2] > http://docs.oracle.com/javaee/1.4/api/javax/servlet/ServletRequest.html#getParameterMap%28%29 > > Best regards, > Konstantin Kolinko > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Application throwing ClassCast Exception while upgrading from tomcat 8.0.18 to tomcat 8.0.30
2016-01-20 1:47 GMT+03:00 Mark Thomas: > On 19/01/2016 16:37, Adhavan Mathiyalagan wrote: >> Thanks Mark ! Please find my answer >> >> Figure out what is inserting something other than String[] as the value >> into a Map instance. >> >> There are lot of places in Client we insert 'Integer' datatype (Also >> other datatypes) .I fear that it is going to be more >> tedious thing to identify and fix all the client code. >> >> Is there any other way or path forward to fix this ? (Like upgrading the >> displaytag version >> which is currently 1.1) Or Is the modifying the Client Code is the only >> path forward ? > > It depends. How are you inserting Integers into that Map? I'm trying to > figure out if this is a client code bug or if the restriction that was > added to Tomcat was overly strict and needs to be reverted. > Looking for DisplayTag 1.1 source jar at Maven Central, it is a rather old library. The latest version is 1.2 (released in 2008). 1.1 was released in 2006. Why OP haven't upgraded to 1.2 ? Web site: http://www.displaytag.org/ http://sourceforge.net/projects/displaytag/ That said, I do not see any obvious errors in that library. It creates a copy of parameter map (DefaultRequestHelper.getParameterMap()). I do not see it inserting any values into original map. I also do not see it implementing a ServletRequestWrapper. So I think the error is not in the library, but in some other code. I think the Tomcat code is OK. The official Servlet Specification javadoc says that the values in ParameterMap are String[], and this requirement has to be enforced at some point of time. Looking into Servlet 2.4 Javadoc (the spec released in 2003, implemented by Tomcat 5.x) it says exactly the same. [1][2] So a library released in year 2006 must follow it. Regarding a technical way to insert incorrect parameters. In theory I see two ways: 1. org.apache.catalina.core.ApplicationHttpRequest is a wrapper. The wrapped request may be beyond our control, but it still has to follow the spec. 2. The map returned by ApplicationHttpRequest class must be immutable [2], but it is not enforced. I filed https://bz.apache.org/bugzilla/show_bug.cgi?id=58946 [1] https://wiki.apache.org/tomcat/Specifications#Java_Servlet_Specifications [2] http://docs.oracle.com/javaee/1.4/api/javax/servlet/ServletRequest.html#getParameterMap%28%29 Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Application throwing ClassCast Exception while upgrading from tomcat 8.0.18 to tomcat 8.0.30
Hi Mark, Kindly let me know if any further information required apart from the information that i have provided in the above mail. Thanks & Regards, Adhavan.M On Wed, Jan 27, 2016 at 4:09 PM, Adhavan Mathiyalaganwrote: > Hi Mark, > > Kindly find my answer for your query > > How are you inserting Integers into that Map? > > Displaytag(3pp) introduces the value for the 'table name parameter > tag'(highlighted in bold) as integer in the request . > > this is used as identifier for the table name. > > Http Request Parameter : > > {*d-3034713-p=1*, > Description=[Ljava.lang.String;@9afb582, > SuToken=[Ljava.lang.String;@6eb56ec5, > requestMapping=[Ljava.lang.String;@497b804b, > IVP_Code=[Ljava.lang.String;@4b23e19d, > RequestTimeStamp=[Ljava.lang.String;@20b130f5, > OkButton=[Ljava.lang.String;@51053597, > FW_SubmittedFormPath=[Ljava.lang.String;@2d01760f, > IVP_Description=[Ljava.lang.String;@3aede9de, > SuStepName=[Ljava.lang.String;@59950c0b, > Code=[Ljava.lang.String;@4849d41f} > > As the tomcat version ( greater than tomcat 8.0.18) version restricts the > parameter value type to String only Hence the below class cast exception is > thrown . > > Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast > to [Ljava.lang.String; > at > org.apache.catalina.core.ApplicationHttpRequest.getParameter(ApplicationHttpRequest.java:369) > at > org.displaytag.util.DefaultRequestHelper.getParameterMap(DefaultRequestHelper.java:128) > at > org.displaytag.util.DefaultRequestHelper.getHref(DefaultRequestHelper.java:75) > at > com.ccc.ddd.cfw.wcs.uitemplates.taglib.displaytag.ExtendedRequestHelper.getHref(ExtendedRequestHelper.java:191) > at org.displaytag.tags.TableTag.initHref(TableTag.java:1061) > at > com.ccc.ddd.cfw.wcs.uitemplates.taglib.displaytag.TableTag.initHref(TableTag.java:666) > at org.displaytag.tags.TableTag.initParameters(TableTag.java:866) > at org.displaytag.tags.TableTag.doStartTag(TableTag.java:722) > at > com.ccc.ddd.cfw.wcs.uitemplates.taglib.displaytag.TableTag.doStartTag(TableTag.java:712) > > > Version of the 3PP Used : > > Displaytag version : displaytag 1.1 > Tomcat Version : tomcat 8.0.30 > > Kindly suggest me the path forward for the issue. > > Thanks in Advance. > > Adhavan.M > > > > On Fri, Jan 22, 2016 at 6:46 PM, Mark Thomas wrote: > >> On 22/01/2016 13:01, Adhavan Mathiyalagan wrote: >> > Hi Mark, >> > >> > Kindly let me know if you can conclude if the issue is on the client >> side >> > of application or tomcat restriction that has/will be reverted. >> >> Until you answer my previous question, this thread is not going to >> progress. >> >> Mark >> >> >> > >> > Note : As i mentioned already the application was working without issues >> > with tomcat version <= 8.0.18 >> > >> > Thanks , >> > Adhavan >> > >> > >> > >> > On Wed, Jan 20, 2016 at 4:17 AM, Mark Thomas wrote: >> > >> >> On 19/01/2016 16:37, Adhavan Mathiyalagan wrote: >> >>> Thanks Mark ! Please find my answer >> >>> >> >>> Figure out what is inserting something other than String[] as the >> value >> >>> into a Map instance. >> >>> >> >>> There are lot of places in Client we insert 'Integer' datatype >> (Also >> >>> other datatypes) .I fear that it is going to be more >> >>> tedious thing to identify and fix all the client code. >> >>> >> >>> Is there any other way or path forward to fix this ? (Like upgrading >> the >> >>> displaytag version >> >>> which is currently 1.1) Or Is the modifying the Client Code is the >> only >> >>> path forward ? >> >> >> >> It depends. How are you inserting Integers into that Map? I'm trying to >> >> figure out if this is a client code bug or if the restriction that was >> >> added to Tomcat was overly strict and needs to be reverted. >> >> >> >> Mark >> >> >> >> >> >>> >> >>> Thanks Again ! >> >>> >> >>> On Tue, Jan 19, 2016 at 8:12 PM, Mark Thomas >> wrote: >> >>> >> On 19/01/2016 13:39, Adhavan Mathiyalagan wrote: >> >> >> >> > What i could understand is application is throwing exception due to >> change >> > in the getParameter method of ApplicationHttpRequest class ,which >> >> earlier >> > was accepting all datatypes (like Integer) >> > is now restricted to 'String' datatype only . >> > >> > Kindly let me know why this change has been done ( in the >> getParameter >> > method of ApplicationHttpRequest class) >> >> If only the Apache Tomcat project used some form of version control >> system where every change to the source code was tracked along with a >> comment that explained why... >> >> > and the suggest me the path forward >> > for fixing the issue. >> >> Figure out what is inserting something other than String[] as the >> value >> into a Map instance. >> >> Mark >> >> >>
Re: Application throwing ClassCast Exception while upgrading from tomcat 8.0.18 to tomcat 8.0.30
On 29/01/2016 14:09, Adhavan Mathiyalagan wrote: > Hi Mark, > > Kindly let me know if any further information required apart from the > information that i have provided in the above mail. You haven't answered my question. How are you inserting the non-String data into the request parameter map? Mark > > Thanks & Regards, > Adhavan.M > > > > On Wed, Jan 27, 2016 at 4:09 PM, Adhavan Mathiyalagan> wrote: > >> Hi Mark, >> >> Kindly find my answer for your query >> >> How are you inserting Integers into that Map? >> >> Displaytag(3pp) introduces the value for the 'table name parameter >> tag'(highlighted in bold) as integer in the request . >> >> this is used as identifier for the table name. >> >> Http Request Parameter : >> >> {*d-3034713-p=1*, >> Description=[Ljava.lang.String;@9afb582, >> SuToken=[Ljava.lang.String;@6eb56ec5, >> requestMapping=[Ljava.lang.String;@497b804b, >> IVP_Code=[Ljava.lang.String;@4b23e19d, >> RequestTimeStamp=[Ljava.lang.String;@20b130f5, >> OkButton=[Ljava.lang.String;@51053597, >> FW_SubmittedFormPath=[Ljava.lang.String;@2d01760f, >> IVP_Description=[Ljava.lang.String;@3aede9de, >> SuStepName=[Ljava.lang.String;@59950c0b, >> Code=[Ljava.lang.String;@4849d41f} >> >> As the tomcat version ( greater than tomcat 8.0.18) version restricts the >> parameter value type to String only Hence the below class cast exception is >> thrown . >> >> Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast >> to [Ljava.lang.String; >> at >> org.apache.catalina.core.ApplicationHttpRequest.getParameter(ApplicationHttpRequest.java:369) >> at >> org.displaytag.util.DefaultRequestHelper.getParameterMap(DefaultRequestHelper.java:128) >> at >> org.displaytag.util.DefaultRequestHelper.getHref(DefaultRequestHelper.java:75) >> at >> com.ccc.ddd.cfw.wcs.uitemplates.taglib.displaytag.ExtendedRequestHelper.getHref(ExtendedRequestHelper.java:191) >> at org.displaytag.tags.TableTag.initHref(TableTag.java:1061) >> at >> com.ccc.ddd.cfw.wcs.uitemplates.taglib.displaytag.TableTag.initHref(TableTag.java:666) >> at org.displaytag.tags.TableTag.initParameters(TableTag.java:866) >> at org.displaytag.tags.TableTag.doStartTag(TableTag.java:722) >> at >> com.ccc.ddd.cfw.wcs.uitemplates.taglib.displaytag.TableTag.doStartTag(TableTag.java:712) >> >> >> Version of the 3PP Used : >> >> Displaytag version : displaytag 1.1 >> Tomcat Version : tomcat 8.0.30 >> >> Kindly suggest me the path forward for the issue. >> >> Thanks in Advance. >> >> Adhavan.M >> >> >> >> On Fri, Jan 22, 2016 at 6:46 PM, Mark Thomas wrote: >> >>> On 22/01/2016 13:01, Adhavan Mathiyalagan wrote: Hi Mark, Kindly let me know if you can conclude if the issue is on the client >>> side of application or tomcat restriction that has/will be reverted. >>> >>> Until you answer my previous question, this thread is not going to >>> progress. >>> >>> Mark >>> >>> Note : As i mentioned already the application was working without issues with tomcat version <= 8.0.18 Thanks , Adhavan On Wed, Jan 20, 2016 at 4:17 AM, Mark Thomas wrote: > On 19/01/2016 16:37, Adhavan Mathiyalagan wrote: >> Thanks Mark ! Please find my answer >> >> Figure out what is inserting something other than String[] as the >>> value >> into a Map instance. >> >> There are lot of places in Client we insert 'Integer' datatype >>> (Also >> other datatypes) .I fear that it is going to be more >> tedious thing to identify and fix all the client code. >> >> Is there any other way or path forward to fix this ? (Like upgrading >>> the >> displaytag version >> which is currently 1.1) Or Is the modifying the Client Code is the >>> only >> path forward ? > > It depends. How are you inserting Integers into that Map? I'm trying to > figure out if this is a client code bug or if the restriction that was > added to Tomcat was overly strict and needs to be reverted. > > Mark > > >> >> Thanks Again ! >> >> On Tue, Jan 19, 2016 at 8:12 PM, Mark Thomas >>> wrote: >> >>> On 19/01/2016 13:39, Adhavan Mathiyalagan wrote: >>> >>> >>> What i could understand is application is throwing exception due to >>> change in the getParameter method of ApplicationHttpRequest class ,which > earlier was accepting all datatypes (like Integer) is now restricted to 'String' datatype only . Kindly let me know why this change has been done ( in the >>> getParameter method of ApplicationHttpRequest class) >>> >>> If only the Apache Tomcat project used some form of version control >>> system where every change to the source code was tracked along with a >>> comment that explained why... >>> and the suggest me the
Re: Application throwing ClassCast Exception while upgrading from tomcat 8.0.18 to tomcat 8.0.30
Hi Mark, Kindly find my answer for your query How are you inserting Integers into that Map? Displaytag(3pp) introduces the value for the 'table name parameter tag'(highlighted in bold) as integer in the request . this is used as identifier for the table name. Http Request Parameter : {*d-3034713-p=1*, Description=[Ljava.lang.String;@9afb582, SuToken=[Ljava.lang.String;@6eb56ec5, requestMapping=[Ljava.lang.String;@497b804b, IVP_Code=[Ljava.lang.String;@4b23e19d, RequestTimeStamp=[Ljava.lang.String;@20b130f5, OkButton=[Ljava.lang.String;@51053597, FW_SubmittedFormPath=[Ljava.lang.String;@2d01760f, IVP_Description=[Ljava.lang.String;@3aede9de, SuStepName=[Ljava.lang.String;@59950c0b, Code=[Ljava.lang.String;@4849d41f} As the tomcat version ( greater than tomcat 8.0.18) version restricts the parameter value type to String only Hence the below class cast exception is thrown . Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to [Ljava.lang.String; at org.apache.catalina.core.ApplicationHttpRequest.getParameter(ApplicationHttpRequest.java:369) at org.displaytag.util.DefaultRequestHelper.getParameterMap(DefaultRequestHelper.java:128) at org.displaytag.util.DefaultRequestHelper.getHref(DefaultRequestHelper.java:75) at com.ccc.ddd.cfw.wcs.uitemplates.taglib.displaytag.ExtendedRequestHelper.getHref(ExtendedRequestHelper.java:191) at org.displaytag.tags.TableTag.initHref(TableTag.java:1061) at com.ccc.ddd.cfw.wcs.uitemplates.taglib.displaytag.TableTag.initHref(TableTag.java:666) at org.displaytag.tags.TableTag.initParameters(TableTag.java:866) at org.displaytag.tags.TableTag.doStartTag(TableTag.java:722) at com.ccc.ddd.cfw.wcs.uitemplates.taglib.displaytag.TableTag.doStartTag(TableTag.java:712) Version of the 3PP Used : Displaytag version : displaytag 1.1 Tomcat Version : tomcat 8.0.30 Kindly suggest me the path forward for the issue. Thanks in Advance. Adhavan.M On Fri, Jan 22, 2016 at 6:46 PM, Mark Thomaswrote: > On 22/01/2016 13:01, Adhavan Mathiyalagan wrote: > > Hi Mark, > > > > Kindly let me know if you can conclude if the issue is on the client side > > of application or tomcat restriction that has/will be reverted. > > Until you answer my previous question, this thread is not going to > progress. > > Mark > > > > > > Note : As i mentioned already the application was working without issues > > with tomcat version <= 8.0.18 > > > > Thanks , > > Adhavan > > > > > > > > On Wed, Jan 20, 2016 at 4:17 AM, Mark Thomas wrote: > > > >> On 19/01/2016 16:37, Adhavan Mathiyalagan wrote: > >>> Thanks Mark ! Please find my answer > >>> > >>> Figure out what is inserting something other than String[] as the value > >>> into a Map instance. > >>> > >>> There are lot of places in Client we insert 'Integer' datatype > (Also > >>> other datatypes) .I fear that it is going to be more > >>> tedious thing to identify and fix all the client code. > >>> > >>> Is there any other way or path forward to fix this ? (Like upgrading > the > >>> displaytag version > >>> which is currently 1.1) Or Is the modifying the Client Code is the > only > >>> path forward ? > >> > >> It depends. How are you inserting Integers into that Map? I'm trying to > >> figure out if this is a client code bug or if the restriction that was > >> added to Tomcat was overly strict and needs to be reverted. > >> > >> Mark > >> > >> > >>> > >>> Thanks Again ! > >>> > >>> On Tue, Jan 19, 2016 at 8:12 PM, Mark Thomas wrote: > >>> > On 19/01/2016 13:39, Adhavan Mathiyalagan wrote: > > > > > What i could understand is application is throwing exception due to > change > > in the getParameter method of ApplicationHttpRequest class ,which > >> earlier > > was accepting all datatypes (like Integer) > > is now restricted to 'String' datatype only . > > > > Kindly let me know why this change has been done ( in the > getParameter > > method of ApplicationHttpRequest class) > > If only the Apache Tomcat project used some form of version control > system where every change to the source code was tracked along with a > comment that explained why... > > > and the suggest me the path forward > > for fixing the issue. > > Figure out what is inserting something other than String[] as the > value > into a Map instance. > > Mark > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > >>> > >> > >> > >> - > >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > >> For additional commands, e-mail: users-h...@tomcat.apache.org > >> > >> > > > > >
Re: Application throwing ClassCast Exception while upgrading from tomcat 8.0.18 to tomcat 8.0.30
Hi Mark, Kindly let me know if you can conclude if the issue is on the client side of application or tomcat restriction that has/will be reverted. Note : As i mentioned already the application was working without issues with tomcat version <= 8.0.18 Thanks , Adhavan On Wed, Jan 20, 2016 at 4:17 AM, Mark Thomaswrote: > On 19/01/2016 16:37, Adhavan Mathiyalagan wrote: > > Thanks Mark ! Please find my answer > > > > Figure out what is inserting something other than String[] as the value > > into a Map instance. > > > > There are lot of places in Client we insert 'Integer' datatype (Also > > other datatypes) .I fear that it is going to be more > > tedious thing to identify and fix all the client code. > > > > Is there any other way or path forward to fix this ? (Like upgrading the > > displaytag version > > which is currently 1.1) Or Is the modifying the Client Code is the only > > path forward ? > > It depends. How are you inserting Integers into that Map? I'm trying to > figure out if this is a client code bug or if the restriction that was > added to Tomcat was overly strict and needs to be reverted. > > Mark > > > > > > Thanks Again ! > > > > On Tue, Jan 19, 2016 at 8:12 PM, Mark Thomas wrote: > > > >> On 19/01/2016 13:39, Adhavan Mathiyalagan wrote: > >> > >> > >> > >>> What i could understand is application is throwing exception due to > >> change > >>> in the getParameter method of ApplicationHttpRequest class ,which > earlier > >>> was accepting all datatypes (like Integer) > >>> is now restricted to 'String' datatype only . > >>> > >>> Kindly let me know why this change has been done ( in the getParameter > >>> method of ApplicationHttpRequest class) > >> > >> If only the Apache Tomcat project used some form of version control > >> system where every change to the source code was tracked along with a > >> comment that explained why... > >> > >>> and the suggest me the path forward > >>> for fixing the issue. > >> > >> Figure out what is inserting something other than String[] as the value > >> into a Map instance. > >> > >> Mark > >> > >> > >> - > >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > >> For additional commands, e-mail: users-h...@tomcat.apache.org > >> > >> > > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Application throwing ClassCast Exception while upgrading from tomcat 8.0.18 to tomcat 8.0.30
On 22/01/2016 13:01, Adhavan Mathiyalagan wrote: > Hi Mark, > > Kindly let me know if you can conclude if the issue is on the client side > of application or tomcat restriction that has/will be reverted. Until you answer my previous question, this thread is not going to progress. Mark > > Note : As i mentioned already the application was working without issues > with tomcat version <= 8.0.18 > > Thanks , > Adhavan > > > > On Wed, Jan 20, 2016 at 4:17 AM, Mark Thomaswrote: > >> On 19/01/2016 16:37, Adhavan Mathiyalagan wrote: >>> Thanks Mark ! Please find my answer >>> >>> Figure out what is inserting something other than String[] as the value >>> into a Map instance. >>> >>> There are lot of places in Client we insert 'Integer' datatype (Also >>> other datatypes) .I fear that it is going to be more >>> tedious thing to identify and fix all the client code. >>> >>> Is there any other way or path forward to fix this ? (Like upgrading the >>> displaytag version >>> which is currently 1.1) Or Is the modifying the Client Code is the only >>> path forward ? >> >> It depends. How are you inserting Integers into that Map? I'm trying to >> figure out if this is a client code bug or if the restriction that was >> added to Tomcat was overly strict and needs to be reverted. >> >> Mark >> >> >>> >>> Thanks Again ! >>> >>> On Tue, Jan 19, 2016 at 8:12 PM, Mark Thomas wrote: >>> On 19/01/2016 13:39, Adhavan Mathiyalagan wrote: > What i could understand is application is throwing exception due to change > in the getParameter method of ApplicationHttpRequest class ,which >> earlier > was accepting all datatypes (like Integer) > is now restricted to 'String' datatype only . > > Kindly let me know why this change has been done ( in the getParameter > method of ApplicationHttpRequest class) If only the Apache Tomcat project used some form of version control system where every change to the source code was tracked along with a comment that explained why... > and the suggest me the path forward > for fixing the issue. Figure out what is inserting something other than String[] as the value into a Map instance. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org >>> >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Application throwing ClassCast Exception while upgrading from tomcat 8.0.18 to tomcat 8.0.30
On 19/01/2016 16:37, Adhavan Mathiyalagan wrote: > Thanks Mark ! Please find my answer > > Figure out what is inserting something other than String[] as the value > into a Mapinstance. > > There are lot of places in Client we insert 'Integer' datatype (Also > other datatypes) .I fear that it is going to be more > tedious thing to identify and fix all the client code. > > Is there any other way or path forward to fix this ? (Like upgrading the > displaytag version > which is currently 1.1) Or Is the modifying the Client Code is the only > path forward ? It depends. How are you inserting Integers into that Map? I'm trying to figure out if this is a client code bug or if the restriction that was added to Tomcat was overly strict and needs to be reverted. Mark > > Thanks Again ! > > On Tue, Jan 19, 2016 at 8:12 PM, Mark Thomas wrote: > >> On 19/01/2016 13:39, Adhavan Mathiyalagan wrote: >> >> >> >>> What i could understand is application is throwing exception due to >> change >>> in the getParameter method of ApplicationHttpRequest class ,which earlier >>> was accepting all datatypes (like Integer) >>> is now restricted to 'String' datatype only . >>> >>> Kindly let me know why this change has been done ( in the getParameter >>> method of ApplicationHttpRequest class) >> >> If only the Apache Tomcat project used some form of version control >> system where every change to the source code was tracked along with a >> comment that explained why... >> >>> and the suggest me the path forward >>> for fixing the issue. >> >> Figure out what is inserting something other than String[] as the value >> into a Map instance. >> >> Mark >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Application throwing ClassCast Exception while upgrading from tomcat 8.0.18 to tomcat 8.0.30
On 19/01/2016 13:39, Adhavan Mathiyalagan wrote: > What i could understand is application is throwing exception due to change > in the getParameter method of ApplicationHttpRequest class ,which earlier > was accepting all datatypes (like Integer) > is now restricted to 'String' datatype only . > > Kindly let me know why this change has been done ( in the getParameter > method of ApplicationHttpRequest class) If only the Apache Tomcat project used some form of version control system where every change to the source code was tracked along with a comment that explained why... > and the suggest me the path forward > for fixing the issue. Figure out what is inserting something other than String[] as the value into a Mapinstance. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Application throwing ClassCast Exception while upgrading from tomcat 8.0.18 to tomcat 8.0.30
Thanks Mark ! Please find my answer Figure out what is inserting something other than String[] as the value into a Mapinstance. There are lot of places in Client we insert 'Integer' datatype (Also other datatypes) .I fear that it is going to be more tedious thing to identify and fix all the client code. Is there any other way or path forward to fix this ? (Like upgrading the displaytag version which is currently 1.1) Or Is the modifying the Client Code is the only path forward ? Thanks Again ! On Tue, Jan 19, 2016 at 8:12 PM, Mark Thomas wrote: > On 19/01/2016 13:39, Adhavan Mathiyalagan wrote: > > > > > What i could understand is application is throwing exception due to > change > > in the getParameter method of ApplicationHttpRequest class ,which earlier > > was accepting all datatypes (like Integer) > > is now restricted to 'String' datatype only . > > > > Kindly let me know why this change has been done ( in the getParameter > > method of ApplicationHttpRequest class) > > If only the Apache Tomcat project used some form of version control > system where every change to the source code was tracked along with a > comment that explained why... > > > and the suggest me the path forward > > for fixing the issue. > > Figure out what is inserting something other than String[] as the value > into a Map instance. > > Mark > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >