Getting Strange Error From Cron Job

5 views
Skip to first unread message

Kevin

unread,
Nov 18, 2009, 7:44:07 PM11/18/09
to Google App Engine
I am attempting to implement an application that performs some
occasional web crawling as a component of its day-to-day
functionality.
The web crawling code can be executed from a jsp file. When I test it
on my computer by accessing the jsp file, it performs its desired
function nicely, as expected.
So I decided to go try it on the app engine, and if I run it by
accessing the .jsp file, I get a HardDeadlineExceededError, which I am
told occurs when the request takes longer than 30 seconds, which is
understandable.
However, when I try to execute it as a cron job, every time it runs,
it ends after about 5 seconds, with a different exception:
java.lang.ClassCastException: java.lang.ArrayIndexOutOfBoundsException
cannot be cast to javax.servlet.ServletException
...and the stack trace doesn't reference any of my code at all, which
is making this difficult to debug. Does anyone have a clue what might
be causing something like this?

N. Rosencrantz

unread,
Nov 18, 2009, 10:03:26 PM11/18/09
to Google App Engine
I'd reproduce and track exactly where, either in engine or app, find
the iteration or recursion accessing the Array and we know more. Array
or ArrayList is the best structure and trying to access element
outside array means an array index calculation went one beyond
predefined Array length. Meantime here's a good old classic themed
crawling http://www.weyrich.com/book_reviews/internet_agents.html
technical and cultural
Sincerely
Nick Rosencrantz
In fact there're 2 errors here, the (expensive) casting fails and it
tries accessing a row element longer than the row. Which could be a
Vector internally Array implemented. Vector internally
Reply all
Reply to author
Forward
0 new messages