Sudden failure with getInputStream() on JDK1.7.0_25
I have been running a application at my work for 3years time, but all of a
sudden it has decided to fail. I cannot figure out if there is an network
issue involved or something entirely different.
Stacktrace:
java.lang.NullPointerException
at
sun.net.www.protocol.http.NegotiateAuthentication.isSupported(NegotiateAuthentication.java:99)
at
sun.net.www.protocol.http.AuthenticationHeader.parse(AuthenticationHeader.java:180)
at
sun.net.www.protocol.http.AuthenticationHeader.<init>(AuthenticationHeader.java:126)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1374)
at domain.ActivationSMSReceiverMain.processLogFromUrl(SMSSys.java:327)
at domain.ActivationSMSReceiverMain.<init>(SMSSys.java:45)
at domain.ActivationSMSReceiverMain.main(SMSSys.java:477)
Code sample:
URL url = new URL(uri);
HttpURLConnection uc = (HttpURLConnection) url.openConnection();
BufferedReader in = new BufferedReader(new
InputStreamReader(uc.getInputStream()));
I have ensured that the uri is well-formed (http://www.blah/?something).
No comments:
Post a Comment