Hi,
I want to check the existence of a url and i tried with the following code in java,
The above code is working fine in windows but when the code is run through server (linux) i am getting the following error message,
GConf Error: Failed to contact configuration server; some possible
causes are that you need to enable TCP/IP networking for ORBit, or
you have stale NFS locks due to a system crash. See
http://projects.gnome.org/gconf/ for information. (Details - 1:
Not running within active session)
GConf Error: Failed to contact configuration server; some possible
causes are that you need to enable TCP/IP networking for ORBit, or
you have stale NFS locks due to a system crash. See
http://projects.gnome.org/gconf/ for information. (Details - 1:
Not running within active session)
java.net.Unknow nHostException: www.ep.gov
at
java.net.PlainS ocketImpl.conne ct(PlainSocketI mpl.java:177)
at
java.net.SocksS ocketImpl.conne ct(SocksSocketI mpl.java:366)
at java.net.Socket .connect(Socket .java:525)
at sun.net.Network Client.doConnec t(NetworkClient .java:158)
at
sun.net.https://www.http.HttpClient.openServ...lient.java:394)
at
sun.net.https://www.http.HttpClient.openServ...lient.java:529)
at sun.net.www.htt p.HttpClient.<i nit>(HttpClient .java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:323)
at
sun.net.https://www.protocol.http.HttpURLCon...ction.java:860)
at
sun.net.https://www.protocol.http.HttpURLCon...ction.java:801)
at
sun.net.https://www.protocol.http.HttpURLCon...ction.java:726)
This is a very serious issue as our project is deployed and run in server.
I want to check the existence of a url and i tried with the following code in java,
Code:
public boolean exists(String URLName) {
try {
if (!URLName.toUpperCase().contains("HTTP"))
URLName="http://"+URLName;
URL url = new URL(URLName);
System.setProperty("java.net.useSystemProxies", "true");
HttpURLConnection urlConn = (HttpURLConnection) url.openConnection();
urlConn.setConnectTimeout(9000);
urlConn.setReadTimeout(9000);
urlConn.connect();
if(HttpURLConnection.HTTP_OK == urlConn.getResponseCode())
return true;
else
return false;
}
catch (SocketTimeoutException e){
return false;
}
catch (Exception e) {
e.printStackTrace();
return false;
}
}
GConf Error: Failed to contact configuration server; some possible
causes are that you need to enable TCP/IP networking for ORBit, or
you have stale NFS locks due to a system crash. See
http://projects.gnome.org/gconf/ for information. (Details - 1:
Not running within active session)
GConf Error: Failed to contact configuration server; some possible
causes are that you need to enable TCP/IP networking for ORBit, or
you have stale NFS locks due to a system crash. See
http://projects.gnome.org/gconf/ for information. (Details - 1:
Not running within active session)
java.net.Unknow nHostException: www.ep.gov
at
java.net.PlainS ocketImpl.conne ct(PlainSocketI mpl.java:177)
at
java.net.SocksS ocketImpl.conne ct(SocksSocketI mpl.java:366)
at java.net.Socket .connect(Socket .java:525)
at sun.net.Network Client.doConnec t(NetworkClient .java:158)
at
sun.net.https://www.http.HttpClient.openServ...lient.java:394)
at
sun.net.https://www.http.HttpClient.openServ...lient.java:529)
at sun.net.www.htt p.HttpClient.<i nit>(HttpClient .java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:323)
at
sun.net.https://www.protocol.http.HttpURLCon...ction.java:860)
at
sun.net.https://www.protocol.http.HttpURLCon...ction.java:801)
at
sun.net.https://www.protocol.http.HttpURLCon...ction.java:726)
This is a very serious issue as our project is deployed and run in server.
Comment