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 2014/04/22 09:05:33 UTC
[Bug 56441] New: Misleading error message in FilterBase cause by
invalid regex
https://issues.apache.org/bugzilla/show_bug.cgi?id=56441
Bug ID: 56441
Summary: Misleading error message in FilterBase cause by
invalid regex
Product: Tomcat 7
Version: 7.0.29
Hardware: All
OS: Linux
Status: NEW
Severity: minor
Priority: P2
Component: Catalina
Assignee: dev@tomcat.apache.org
Reporter: matty_riddle@hotmail.com
An invalid regex in the allow parameter leads to raising of a misleading
exception: The property "allow" is not defined for filters of type
"org.apache.catalina.filters.RemoteAddrFilter".
Test config in web.xml
<filter>
<filter-name>TestFilter</filter-name>
<filter-class>org.apache.catalina.filters.RemoteAddrFilter</filter-class>
<init-param>
<param-name>allow</param-name>
<param-value>127\.0\.\0.1</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>TestFilter</filter-name>
<url-pattern>*</url-pattern>
</filter-mapping>
Apr 22, 2014 3:50:10 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter TestFilter
javax.servlet.ServletException: The property "allow" is not defined for filters
of type "org.apache.catalina.filters.RemoteAddrFilter"
at org.apache.catalina.filters.FilterBase.init(FilterBase.java:53)
at
org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:269)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)
at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:103)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
--
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 56441] Misleading error message in FilterBase cause by invalid
regex
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56441
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Mark Thomas <ma...@apache.org> ---
I looked into changing the current error message to better describe the problem
and to mention enabling debug logs for more detail. The issue with that
approach is there are a lot of 'normal' debug logs and a single error.
Logging these errors as warnings seems appropriate to me.
I have fixed this in 8.0.x for 8.0.6 onwards and in 7.0.x for 7.0.54 onwards.
--
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 56441] Misleading error message in FilterBase cause by invalid
regex
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56441
--- Comment #1 from Christopher Schultz <ch...@christopherschultz.net> ---
Confirmed.
It seems that IntrospectionUtils.setProperty catches things like
InvocationTargetException and logs them at the DEBUG level. I assert that such
things should be logged at the WARN level.
Without DEBUG logging enabled, a user cannot see the underlying error.
--
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