The "Requests" page errors out if anyone attempts to access pebble/1995/12/32.html

View: New views
2 Messages — Rating Filter:   Alert me  

The "Requests" page errors out if anyone attempts to access pebble/1995/12/32.html

by Weiqi Gao-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I experienced a strange error when I tried to access the "Resuests"
page.  The response contains a generic error message

   Error | Sorry, there has been a problem with your request.

The tomcat log file shows the following stack trace:

Sep 22, 2009 1:59:15 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.IllegalArgumentException: Invalid day of 32 specified, should
be between 1 and 31
         at
net.sourceforge.pebble.domain.Month.getBlogForDay(Month.java:197)
         at net.sourceforge.pebble.domain.Blog.getBlogForDay(Blog.java:857)
         at
net.sourceforge.pebble.permalink.PermalinkProviderSupport.getDay(PermalinkProviderSupport.java:154)
         at
net.sourceforge.pebble.web.filter.UriTransformer.getUri(UriTransformer.java:305)
         at
net.sourceforge.pebble.web.filter.UriTransformer.getUri(UriTransformer.java:89)
         at
net.sourceforge.pebble.web.filter.TransformingFilter.doFilter(TransformingFilter.java:118)
         at sun.reflect.GeneratedMethodAccessor69.invoke(Unknown Source)
         at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
         at
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:218)
         at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
         at
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
         at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
         at java.security.AccessController.doPrivileged(Native Method)
         at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
         at
net.sourceforge.pebble.web.filter.BlogLookupFilter.doFilter(BlogLookupFilter.java:142)
         at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
         at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
         at
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:218)
         at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
         at
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
         at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
         at java.security.AccessController.doPrivileged(Native Method)
         at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
         at
net.sourceforge.pebble.web.filter.GZIPFilter.doFilter(GZIPFilter.java:50)
         at sun.reflect.GeneratedMethodAccessor74.invoke(Unknown Source)
         at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
         at
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:218)
         at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
         at
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
         at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
         at java.security.AccessController.doPrivileged(Native Method)
         at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
         at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
         at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
         at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
         at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
         at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
         at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
         at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
         at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
         at java.lang.Thread.run(Thread.java:619)

As far as I can tell this is caused by googlebot attempting to access
non-sensical URLs such as /1995/12/32.html  (There must be some web page
out there that refer to this non-existing page.  I don't know why).
Here's the first few lines of the result of the following shell command:

[weiqi@gao]$ grep -o "\"GET[^\"]*\"" blog-20090922.log | sort -u
"GET /"
"GET /1868/12.html"
"GET /1869/01.html"
"GET /1869/06.html"
"GET /1870/01.html"
"GET /1871/06.html"
"GET /1871/12.html"
"GET /1872/05.html"
"GET /1872/10.html"
"GET /1873/01.html"
"GET /1873/02.html"
"GET /1873/09.html"
"GET /1873/11.html"
"GET /1898/08.html"
"GET /1921/09.html"
"GET /1922/04.html"
"GET /1923/06.html"
"GET /1923/07.html"
"GET /1923/09.html"
"GET /1924/05.html"
"GET /1995/12/32.html"
"GET /1997/01/32.html"
"GET /1997/12/04.html"
"GET /1997/12/11.html"

A simple editing of the log file fixed the problem.  I found the problem
in Pebble 2.3.1.  But if nobody has touch the relevant code, it might
still be in 2.4.0.

It'll be nice if the "Requests" page can handle this exception (and
other similar exceptions) more gracefully.

--
Weiqi Gao
weiqigao@...
http://www.weiqigao.com/blog/

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Pebble-user mailing list
Pebble-user@...
https://lists.sourceforge.net/lists/listinfo/pebble-user

Re: The "Requests" page errors out if anyone attempts to access pebble/1995/12/32.html

by Olaf Kock-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Weiqi,

funny - I stumbled upon this just yesterday for one day this month. Nice
to see that I don't need to hunt that deep as you've already done this.

This confirms that the current version contains the same code as 2.3.1.

I really have to get around and finish 2.4 ... Sorry, there's so much
distraction these days, weeks and months...

Olaf

Weiqi Gao schrieb:
> Hi,
>
> I experienced a strange error when I tried to access the "Resuests"
> page.  The response contains a generic error message
>
>    Error | Sorry, there has been a problem with your request.
>
[...]
> As far as I can tell this is caused by googlebot attempting to access
> non-sensical URLs such as /1995/12/32.html  (There must be some web page
> out there that refer to this non-existing page.  I don't know why).
> Here's the first few lines of the result of the following shell command:
[...]
> A simple editing of the log file fixed the problem.  I found the problem
> in Pebble 2.3.1.  But if nobody has touch the relevant code, it might
> still be in 2.4.0.
>
> It'll be nice if the "Requests" page can handle this exception (and
> other similar exceptions) more gracefully.
>


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Pebble-user mailing list
Pebble-user@...
https://lists.sourceforge.net/lists/listinfo/pebble-user