I got the following exception when integrating Rome (RSS-reader) with
Google App Engine and testing them locally. I was using maven gae
plugin.
2010-08-11 01:09:41,670 ERROR LoggingHandler:
org.springframework.integration.core.MessagingException: Source method
'receive' threw an Exception.
at
org.springframework.integration.message.MethodInvokingMessageSource.receive(MethodInvokingMessageSource.java:
94)
at
org.springframework.integration.endpoint.SourcePollingChannelAdapter.doPoll(SourcePollingChannelAdapter.java:
76)
at org.springframework.integration.endpoint.AbstractPollingEndpoint
$Poller.innerPoll(AbstractPollingEndpoint.java:232)
at org.springframework.integration.endpoint.AbstractPollingEndpoint
$Poller.poll(AbstractPollingEndpoint.java:216)
at org.springframework.integration.endpoint.AbstractPollingEndpoint
$Poller.run(AbstractPollingEndpoint.java:209)
at org.springframework.integration.scheduling.SimpleTaskScheduler
$ErrorHandlingRunnableWrapper.run(SimpleTaskScheduler.java:307)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:
441)
at java.util.concurrent.FutureTask
$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at org.springframework.integration.scheduling.SimpleTaskScheduler
$TriggeredTask.run(SimpleTaskScheduler.java:256)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:637)
Caused by: com.google.apphosting.api.ApiProxy$CallNotFoundException:
The API package 'urlfetch' or call 'Fetch()' was not found.
at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:95)
at
com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:
34)
at
com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler
$Connection.fetchResponse(URLFetchServiceStreamHandler.java:404)
at
com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler
$Connection.getInputStream(URLFetchServiceStreamHandler.java:283)
at
com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler
$Connection.getResponseCode(URLFetchServiceStreamHandler.java:136)
at
com.sun.syndication.fetcher.impl.HttpURLFeedFetcher.retrieveAndCacheFeed(HttpURLFeedFetcher.java:
161)
at
com.sun.syndication.fetcher.impl.HttpURLFeedFetcher.retrieveFeed(HttpURLFeedFetcher.java:
119)
at com.xxx.xxx.collector.rss.RssReader.obtainFeedItems(RssReader.java:
51)
at com.xxx.xxx.collector.rss.RssReader.receive(RssReader.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:
100)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:
273)
at
org.springframework.integration.util.NameResolvingMethodInvoker.invokeMethod(NameResolvingMethodInvoker.java:
58)
at
org.springframework.integration.message.MethodInvokingMessageSource.receive(MethodInvokingMessageSource.java:
84)
... 12 more
The "receive" method looks like the following. Obviously the error
comes out of
public class RssReader {
private static final Logger LOG =
Logger.getLogger(RssReader.class);
private String rssSourceUrl;
private FeedFetcherCache feedInfoCache;
private FeedFetcher feedFetcher;
private FetcherListener fetcherListener;
public RssReader(String rssSourceUrl) {
this.rssSourceUrl = rssSourceUrl;
feedInfoCache = HashMapFeedInfoCache.getInstance();
feedFetcher = new HttpURLFeedFetcher(feedInfoCache);
if (fetcherListener != null) {
feedFetcher.addFetcherEventListener(fetcherListener);
}
}
public Message<SyndFeed> receive() {
SyndFeed feed = obtainFeedItems();
if (LOG.isDebugEnabled())
LOG.debug("Feed: " + feed.toString());
return MessageBuilder.withPayload(feed).setHeader("feedid",
"slickdeals")
.build();
}
private SyndFeed obtainFeedItems() {
SyndFeed feed = null;
try {
feed = feedFetcher.retrieveFeed(new URL(rssSourceUrl));
} catch (IOException e) {
LOG.error("IO Problem while retrieving feed", e);
} catch (FeedException e) {
LOG.error("Feed Problem while retrieving feed", e);
} catch (FetcherException e) {
LOG.error("Fetcher Problem while retrieving feed", e);
}
return feed;
}
}
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.