Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2006

Tip: Looking for answers? Try searching our database.

NullPointerException inside HttpUrlConnection::plainConnect

Thread view: 
jason.keirstead@gmail.com - 25 Oct 2006 14:50 GMT
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 - 25 Oct 2006 18:32 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.