Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NullPointerException inside HttpUrlConnection::plainConnect

5 views
Skip to first unread message

jason.k...@gmail.com

unread,
Oct 25, 2006, 9:50:09 AM10/25/06
to
Hello. I am getting an exception when I try to execute the following
simple code:

URL rssURL = new URL("http://rss.slashdot.org/Slashdot/slashdot");
rssURL.openStream();

Here is the exception. It is very baffling and annoying since I can not
figure out what is "null" since I don't have the source to the JDK (I
did download the SCSL source, but it's from version 1.5.0.0 and the
line numbers in this class do not line up with 1.5.0.9)

Does anyone have any idea what is wrong?

java.lang.NullPointerException
at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:785)
at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:673)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:917)
at java.net.URL.openStream(URL.java:1007)

Manish Pandit

unread,
Oct 25, 2006, 1:32:07 PM10/25/06
to
Hi,

I had the same kind of problem once (with Google's Blogger API) and was
baffled for weeks. Turned out that I had an antivirus/firewall on my
box that prevented the JVM from making outgoing connections. Can you
check if this could be the case with you? I had PC-Cillin
firewall/antivirus - I removed java/jre from the list of blocked
programs and it worked like a charm.

-cheers,
Manish

0 new messages