You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Henri Yandell (JIRA)" <ji...@apache.org> on 2007/02/16 21:41:16 UTC

[jira] Commented: (STR-3000) IllegalArgumentException not handled while processing query string

    [ https://issues.apache.org/struts/browse/STR-3000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40159 ] 

Henri Yandell commented on STR-3000:
------------------------------------

Looking at the code in question, it's:

        try {
            BeanUtils.populate(bean, properties);
        } catch (Exception e) {
            throw new ServletException("BeanUtils.populate", e);
        } ...

So it should be a ServletException rather than an IllegalArgumentException. Looking at the history, it's definitely been that way for a while.

When I was talking about the configured exception page; I meant the container one in web.xml:

 <error-page>
    <exception-type>java.lang.Exception</exception-type>
    <location>/error.jsp</location>
  </error-page>

The other option would be to change BeanUtils so that it has a mode that ignores bad properties. There have been a couple of requests for that improvement:

http://issues.apache.org/jira/browse/BEANUTILS-95
http://issues.apache.org/jira/browse/BEANUTILS-175

and oddly http://issues.apache.org/jira/browse/BEANUTILS-176 which seems to be asking for the reverse.

Once that was done, the Struts code above could print a warning and then allow the code to continue. We couldn't do anything without the BeanUtils change though as the beans would only be partly populated.

> IllegalArgumentException not handled while processing query string
> ------------------------------------------------------------------
>
>                 Key: STR-3000
>                 URL: https://issues.apache.org/struts/browse/STR-3000
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.9, 1.3.5
>         Environment: Using jakarta-tomcat 5.0.28 and java1.4.2.
>            Reporter: Chris Book
>
> The following exception is routinely in my tomcat logs.  I'm not sure of the exact query string that causes the property parsing to crash, but this exception is unhandled.  Regardless, struts shouldn't allow this exception to get down to the tomcat layer.
> I've set this as 'major' because it seems to cause tomcat to eventually stop responding to requests. I upgraded from 1.2.9 to 1.3.5 hoping this would be fixed but it crashes with both versions.
> 2007-01-28 12:10:04 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
> java.lang.IllegalArgumentException: Invalid mapped property ' U  (feat'
>         at org.apache.commons.beanutils.PropertyUtilsBean.getMappedProperty(PropertyUtilsBean.java:476)
>         at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:662)
>         at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:715)
>         at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:884)
>         at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811)
>         at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298)
>         at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:451)
>         at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:794)
>         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:191)
>         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
>         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:446)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>         at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
>         at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
>         at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
>         at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
>         at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
>         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
>         at java.lang.Thread.run(Thread.java:534)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.