Hello all,
I am using the georss module.
I was successful with using this a month ago.
Recently I revisited my code and now I am receiving the following error:
Code:
java.lang.ClassCastException: com.sun.syndication.feed.module.georss.SimpleModuleImpl
at com.sun.syndication.feed.module.georss.GeoRSSUtils.getGeoRSS(Unknown Source)
I tried using the simple example on http://georss.geonames.org/
Specifically:
[/url]
Code:
SyndFeedInput input = new SyndFeedInput();
SyndFeed feed = input.build(new XmlReader(new URL(
"http://www.geonames.org/recent-changes.xml")));
List entries = feed.getEntries();
for (SyndEntry entry : entries) {
GeoRSSModule geoRSSModule = GeoRSSUtils.getGeoRSS(entry);
System.out.println(entry.getTitle() + " : lat="
+ geoRSSModule.getLatitude() + ",lng="
+ geoRSSModule.getLongitude() + ", desc="
+ entry.getDescription().getValue() + "; time="
+ entry.getPublishedDate());
}
The error is pointing to this line:
GeoRSSModule geoRSSModule = GeoRSSUtils.getGeoRSS(entry);
Any ideas?
TIA!