java.io.FileNotFoundException for valid URL
Posted
by Alexei
on Stack Overflow
See other posts from Stack Overflow
or by Alexei
Published on 2010-05-08T12:16:44Z
Indexed on
2010/05/08
12:18 UTC
Read the original article
Hit count: 310
Hello. I use library rome.dev.java.net to fetch RSS.
Code is
URL feedUrl = new URL("http://planet.rubyonrails.ru/xml/rss");
SyndFeedInput input = new SyndFeedInput();
SyndFeed feed = input.build(new XmlReader(feedUrl));
You can check that http://planet.rubyonrails.ru/xml/rss is valid URL and the page is shown in browser.
But I get exception from my application
java.io.FileNotFoundException: http://planet.rubyonrails.ru/xml/rss
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1311)
at com.sun.syndication.io.XmlReader.<init>(XmlReader.java:237)
at com.sun.syndication.io.XmlReader.<init>(XmlReader.java:213)
at rssdaemonapp.ValidatorThread.run(ValidatorThread.java:32)
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:619)
I don't use any proxy. I get this exception on my PC and on the production server and only for this URL, other URLs are working.
© Stack Overflow or respective owner