我正在尝试从Lotus Notes中的Java代理到我们网络上的IP地址执行HTTP请求。我在Eclipse中尝试了完全相同的代码,并且请求成功。
URL url = new URL(u);
URLConnection urlConnect = url.openConnection();
urlConnect为空。
错误:
java.lang.NullPointerException
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:719)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:646)
at COM.ibm.JEmpower.applet.http.HttpURLConnection.getInputStream(HttpURLConnection.java:411)
at java.net.URLConnection.getContent(URLConnection.java:712)
at JavaAgent.NotesMain(JavaAgent.java:25)
at lotus.domino.AgentBase.runNotes(Unknown Source)
at lotus.domino.NotesThread.run(Unknown Source)