- 
                Notifications
    You must be signed in to change notification settings 
- Fork 74
Closed
Description
String uri = "http://test.sem.quads/json-quads";
        String ntriple6 = "<http://example.org/s6> <http://example.com/mergeQuadP> <http://example.org/o2> <http://test.sem.quads/json-quads>.";
        File file = new File(datasource + "bug25348.json");
        FileHandle filehandle = new FileHandle();
        filehandle.set(file);
        gmWriter.write(uri, filehandle.withMimetype(RDFMimeTypes.RDFJSON));
        gmWriter.mergeGraphs(new StringHandle(ntriple6).withMimetype(RDFMimeTypes.NQUADS));
        FileHandle handle = gmWriter.read(uri, new FileHandle());
I am seeing the same Exception as in unitTest failure ..
com.sun.jersey.api.client.ClientHandlerException: org.apache.http.client.ClientProtocolException
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:184)
    at com.marklogic.client.impl.DigestChallengeFilter.handle(DigestChallengeFilter.java:34)
    at com.sun.jersey.api.client.filter.HTTPDigestAuthFilter.handle(HTTPDigestAuthFilter.java:493)
    at com.sun.jersey.api.client.Client.handle(Client.java:648)
.
.
 Caused by: org.apache.http.client.ClientProtocolException
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:822)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:776)
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:170)
    ... 39 more
Caused by: org.apache.http.ProtocolException: The server failed to respond with a valid HTTP response
WireTrace At Failure ::
2015/08/28 14:16:59:784 PDT [DEBUG] DefaultClientConnection - Sending request: GET /v1/graphs?database=SemanticsDB-JavaAPI&graph=http://originalGraph HTTP/1.1
2015/08/28 14:16:59:784 PDT [DEBUG] wire - >> "GET /v1/graphs?database=SemanticsDB-JavaAPI&graph=http://originalGraph HTTP/1.1[\r][\n]"
2015/08/28 14:16:59:784 PDT [DEBUG] wire - >> "Accept: application/n-quads[\r][\n]"
2015/08/28 14:16:59:785 PDT [DEBUG] wire - >> "Authorization: Digest username="rest-writer",realm="public",nonce="69e5c582aefc271b4994263b92844b06",opaque="b76a909163d5b433",qop=auth,uri="/v1/graphs",cnonce="e2fa1e25",nc=00000004,response="219f700fd571199a79cef22193e51728"[\r][\n]"
2015/08/28 14:16:59:785 PDT [DEBUG] wire - >> "Host: localhost:8011[\r][\n]"
2015/08/28 14:16:59:786 PDT [DEBUG] wire - >> "Connection: Keep-Alive[\r][\n]"
2015/08/28 14:16:59:786 PDT [DEBUG] wire - >> "[\r][\n]"
2015/08/28 14:16:59:786 PDT [DEBUG] headers - >> GET /v1/graphs?database=SemanticsDB-JavaAPI&graph=http://originalGraph HTTP/1.1
2015/08/28 14:16:59:787 PDT [DEBUG] headers - >> Accept: application/n-quads
2015/08/28 14:16:59:787 PDT [DEBUG] headers - >> Authorization: Digest username="rest-writer",realm="public",nonce="69e5c582aefc271b4994263b92844b06",opaque="b76a909163d5b433",qop=auth,uri="/v1/graphs",cnonce="e2fa1e25",nc=00000004,response="219f700fd571199a79cef22193e51728"
2015/08/28 14:16:59:787 PDT [DEBUG] headers - >> Host: localhost:8011
2015/08/28 14:16:59:788 PDT [DEBUG] headers - >> Connection: Keep-Alive
2015/08/28 14:16:59:791 PDT [DEBUG] wire - << "/triplestore/c60d18746c03e880.xmlHTTP/1.1 200 OK[\r][\n]"
2015/08/28 14:16:59:792 PDT [DEBUG] DefaultResponseParser - Garbage in response: /triplestore/c60d18746c03e880.xmlHTTP/1.1 200 OK
2015/08/28 14:16:59:792 PDT [DEBUG] wire - << "Content-type: application/n-quads; charset=UTF-8[\r][\n]"
2015/08/28 14:16:59:792 PDT [DEBUG] DefaultResponseParser - Garbage in response: Content-type: application/n-quads; charset=UTF-8
2015/08/28 14:16:59:792 PDT [DEBUG] wire - << "Server: MarkLogic[\r][\n]"
2015/08/28 14:16:59:793 PDT [DEBUG] DefaultResponseParser - Garbage in response: Server: MarkLogic
2015/08/28 14:16:59:793 PDT [DEBUG] wire - << "Content-Length: 175[\r][\n]"
2015/08/28 14:16:59:793 PDT [DEBUG] DefaultResponseParser - Garbage in response: Content-Length: 175
2015/08/28 14:16:59:794 PDT [DEBUG] wire - << "Connection: Keep-Alive[\r][\n]"
2015/08/28 14:16:59:794 PDT [DEBUG] DefaultResponseParser - Garbage in response: Connection: Keep-Alive
2015/08/28 14:16:59:794 PDT [DEBUG] wire - << "Keep-Alive: timeout=5[\r][\n]"
2015/08/28 14:16:59:795 PDT [DEBUG] DefaultResponseParser - Garbage in response: Keep-Alive: timeout=5
2015/08/28 14:16:59:795 PDT [DEBUG] wire - << "[\r][\n]"
2015/08/28 14:16:59:795 PDT [DEBUG] DefaultResponseParser - Garbage in response: 
2015/08/28 14:17:05:814 PDT [DEBUG] wire - << "<#electricVehicle2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://people.aifb.kit.edu/awa/2011/smartgrid/schema/smartgrid#ElectricVehicle> <http://originalGraph> .[\r][\n]"
2015/08/28 14:17:05:814 PDT [DEBUG] DefaultResponseParser - Garbage in response: <#electricVehicle2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://people.aifb.kit.edu/awa/2011/smartgrid/schema/smartgrid#ElectricVehicle> <http://originalGraph> .
2015/08/28 14:17:05:815 PDT [DEBUG] DefaultClientConnection - Connection closed
2015/08/28 14:17:05:816 PDT [DEBUG] DefaultClientConnection - Connection shut down
WireTrace When Working ::
2015/08/28 14:39:19:743 PDT [DEBUG] DefaultClientConnection - Sending request: GET /v1/graphs?database=SemanticsDB-JavaAPI&graph=http://originalGraph HTTP/1.1
2015/08/28 14:39:19:744 PDT [DEBUG] wire - >> "GET /v1/graphs?database=SemanticsDB-JavaAPI&graph=http://originalGraph HTTP/1.1[\r][\n]"
2015/08/28 14:39:19:744 PDT [DEBUG] wire - >> "Accept: application/n-quads[\r][\n]"
2015/08/28 14:39:19:745 PDT [DEBUG] wire - >> "Authorization: Digest username="rest-writer",realm="public",nonce="77e3925b35b27e303bfb38bf9499e75b",opaque="0a6ae7f69d7a5a4a",qop=auth,uri="/v1/graphs",cnonce="b2768512",nc=00000004,response="7774bbddce74589fbc02a7b1268a5f79"[\r][\n]"
2015/08/28 14:39:19:745 PDT [DEBUG] wire - >> "Host: localhost:8011[\r][\n]"
2015/08/28 14:39:19:745 PDT [DEBUG] wire - >> "Connection: Keep-Alive[\r][\n]"
2015/08/28 14:39:19:746 PDT [DEBUG] wire - >> "[\r][\n]"
2015/08/28 14:39:19:746 PDT [DEBUG] headers - >> GET /v1/graphs?database=SemanticsDB-JavaAPI&graph=http://originalGraph HTTP/1.1
2015/08/28 14:39:19:746 PDT [DEBUG] headers - >> Accept: application/n-quads
2015/08/28 14:39:19:747 PDT [DEBUG] headers - >> Authorization: Digest username="rest-writer",realm="public",nonce="77e3925b35b27e303bfb38bf9499e75b",opaque="0a6ae7f69d7a5a4a",qop=auth,uri="/v1/graphs",cnonce="b2768512",nc=00000004,response="7774bbddce74589fbc02a7b1268a5f79"
2015/08/28 14:39:19:747 PDT [DEBUG] headers - >> Host: localhost:8011
2015/08/28 14:39:19:747 PDT [DEBUG] headers - >> Connection: Keep-Alive
2015/08/28 14:39:19:753 PDT [DEBUG] wire - << "HTTP/1.1 200 OK[\r][\n]"
2015/08/28 14:39:19:753 PDT [DEBUG] wire - << "Content-type: application/n-quads; charset=UTF-8[\r][\n]"
2015/08/28 14:39:19:753 PDT [DEBUG] wire - << "Server: MarkLogic[\r][\n]"
2015/08/28 14:39:19:754 PDT [DEBUG] wire - << "Content-Length: 175[\r][\n]"
2015/08/28 14:39:19:754 PDT [DEBUG] wire - << "Connection: Keep-Alive[\r][\n]"
2015/08/28 14:39:19:755 PDT [DEBUG] wire - << "Keep-Alive: timeout=5[\r][\n]"
2015/08/28 14:39:19:755 PDT [DEBUG] wire - << "[\r][\n]"
2015/08/28 14:39:19:755 PDT [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 200 OK
2015/08/28 14:39:19:756 PDT [DEBUG] headers - << HTTP/1.1 200 OK
2015/08/28 14:39:19:756 PDT [DEBUG] headers - << Content-type: application/n-quads; charset=UTF-8
2015/08/28 14:39:19:756 PDT [DEBUG] headers - << Server: MarkLogic
2015/08/28 14:39:19:756 PDT [DEBUG] headers - << Content-Length: 175
2015/08/28 14:39:19:757 PDT [DEBUG] headers - << Connection: Keep-Alive
2015/08/28 14:39:19:757 PDT [DEBUG] headers - << Keep-Alive: timeout=5
2015/08/28 14:39:19:758 PDT [DEBUG] DefaultHttpClient - Connection can be kept alive for 5000 MILLISECONDS
2015/08/28 14:39:19:759 PDT [DEBUG] wire - << "<#electricVehicle2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://people.aifb.kit.edu/awa/2011/smartgrid/schema/smartgrid#ElectricVehicle> <http://originalGraph> ."
2015/08/28 14:39:19:759 PDT [DEBUG] ThreadSafeClientConnManager - Released connection is reusable.
2015/08/28 14:39:19:760 PDT [DEBUG] ConnPoolByRoute - Releasing connection [HttpRoute[{}->http://localhost:8011]][null]
2015/08/28 14:39:19:760 PDT [DEBUG] ConnPoolByRoute - Pooling connection [HttpRoute[{}->http://localhost:8011]][null]; keep alive for 5000 MILLISECONDS
2015/08/28 14:39:19:760 PDT [DEBUG] ConnPoolByRoute - Notifying no-one, there are no waiting threads