I have a Spring Controller that is being invoked via an HTTP POST from the GAE Queue Scheduler.

@Controller
@RequestMapping(value = RSSPoller.RSS_POLLER_URL)
public class RSSPoller implements Serializable {
  private static final long serialVersionUID = -4925178778477404709L;

  public static final String RSS_POLLER_URL = "/rsspoller";

  @RequestMapping(method = RequestMethod.POST)
  @ResponseStatus(HttpStatus.OK)
  public void pollAndProcessRssFeed() throws ServiceException  {
    try  {
      // do some stuff
    }
    catch(Exception e)  {
      throw new ServiceException("Can't process RSS feed because", e);
    }
  }
}

However when it gets invoked, the response code is 500 with a Critical log message of

Uncaught exception from servlet
java.lang.RuntimeException: java.io.NotSerializableException: <some spring class that changes all the time, but does not implement java.io.Serializable>

The same log message shows up in the logs with a Warning level as well.

I get similar warning messages (but not critical) in my logs when I invoke other Spring Controllers that either render a web page (GET), or returns some XML data (essentially RPC invokes which use HTTP POST). When I do an HTTP GET/POST to those URLs, the response code is 200 and the output is correct (and I ignore the warning message in the logs).

That leads me to two questions:

1. Why do I get the Critical error message/HTTP 500 for the POST from the queue, but not the GET/POST to other Spring Controllers in my app? 2. How can I trap the exception and essentially discard it; as to my purposes the task is complete.

I can post the full exception log if it's of use; for brevity I've omitted it.

Thanks in advance

--
You received this message because you are subscribed to the Google Groups "Google 
App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to