ChengQian
2012-12-10 08:22:08 UTC
When I use REST api, I met a problem as following is the bug report:
Exception in thread "main"
com.sun.jersey.api.client.ClientHandlerException: java.net.SocketException:
Unexpected end of file from server
at
com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:151)
at com.sun.jersey.api.client.Client.handle(Client.java:648)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
at com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:507)
at NeoRemoteTest.main(NeoRemoteTest.java:27)
Caused by: java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1064)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
at
com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:249)
at
com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:149)
... 5 more
It's a simple connection problem. Sometimes I can connect to
localhost:7474/db/data but sometimes I can't. then the exception is above;
Is it a bug? can't keep connection in long time?
Another problem is that how can I accept long data? The case is that when i
query a larger graph with REST api, I always can't get returned data. the
exception is
OutOfMemory: Java Heap Space.
Anyone knows the solutions?
--
Exception in thread "main"
com.sun.jersey.api.client.ClientHandlerException: java.net.SocketException:
Unexpected end of file from server
at
com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:151)
at com.sun.jersey.api.client.Client.handle(Client.java:648)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
at com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:507)
at NeoRemoteTest.main(NeoRemoteTest.java:27)
Caused by: java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1064)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
at
com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:249)
at
com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:149)
... 5 more
It's a simple connection problem. Sometimes I can connect to
localhost:7474/db/data but sometimes I can't. then the exception is above;
Is it a bug? can't keep connection in long time?
Another problem is that how can I accept long data? The case is that when i
query a larger graph with REST api, I always can't get returned data. the
exception is
OutOfMemory: Java Heap Space.
Anyone knows the solutions?
--