Skip to Main Content

java.lang.IllegalArgumentException: HTTP 405 Method Not Allowed on JAVA API

Luis Rodriguez FernandezSep 12 2017 — edited Aug 20 2020

Hello there,

Our environment looks like:

- jdk1.8.0_101

- pgx-2.4.1

- Using PGX Shared Memory Server

The graph is being correctly loaded in session:

11:47:30,540 INFO ControlEndpoint - Get Pgx configuration

11:47:30,653 DEBUG CsrfTokenValidator - received content type application/json; charset=UTF-8

11:47:30,673 INFO Server - start task CREATE_SESSION

11:47:30,674 DEBUG Task - submit CREATE_SESSION to server-thread

11:47:30,674 DEBUG Task - internal queue START ====> CREATE_SESSION

11:47:30,674 DEBUG CoreSessionImpl$1 - addSession 2017-09-12T15:47:23.977Z [client from remote address XXXX] [idleTimeout=null,taskTimeout=null,unit=null]

11:47:30,676 DEBUG Task - internal queue FINISHED => CREATE_SESSION: total task exec time = 2 ms (0 secs)

11:47:30,736 DEBUG CsrfTokenValidator - received content type application/json; charset=UTF-8

11:47:30,786 INFO CoreEndpoint - create graph {"graphConfig":{"format":"adj_list","vertex_uris":["file:///root/zenodo-filescript/output-lurodrig.txt"],"vertex_id_type":"string","vertex_props":[{"type":"string","name":"url"},{"type":"string","name":"type"}],"separator":","},"graphName":null,"_csrf_token":"XXXXXXXXXXX"}

11:47:34,202 DEBUG StopWatch - Loading Graph - create graph : 95 (2%)

11:47:34,202 DEBUG StopWatch - Loading Graph - (total) : 3371

11:47:34,203 INFO PersistenceManager - loaded data-source version 1505227236000: N = 231017 E = 644547 est. memory (MB) = 20

11:47:34,204 DEBUG Task - task READ_GRAPH unlocks (WRITE) session

11:47:34,205 DEBUG Task - XXXXXXXX FINISHED => READ_GRAPH: total task exec time = 3396 ms (3 secs)

The problem arises when we try to make a request through the JAVA API. In the logs of our client I can see something like this:

1060415 [qtp1794568502-58] DEBUG oracle.pgx.client.RemoteUtils  - create session cookie (session ID = xxxxx)

1060415 [qtp1794568502-58] DEBUG oracle.pgx.client.RemoteUtils  - create csrf token cookie (token = xxxxxxxx)

1060416 [qtp1794568502-58] DEBUG oracle.pgx.client.RemoteUtils  - Requesting POST http://@PGXSERVER.cern.ch:XXXX/core/graph/output-lurodrig/clone//@PGXSERVER.cern.ch:XXXX/core/graph/output-lurodrig/clone HTTP/1.1 with payload {"nodePropNames":null,"edgePropNames":null,"newGraphName":null,"_csrf_token":"XXXXXXX"}

1060416 [qtp1794568502-58] DEBUG org.apache.http.client.protocol.RequestAddCookies  - CookieSpec selected: best-match

1060416 [qtp1794568502-58] DEBUG org.apache.http.client.protocol.RequestAddCookies  - Cookie [version: 0][name: SID][value: XXXXXXXX][domain: PGXSERVER.cern.ch][path: null][expiry: null] match PGXSERVER.cern.ch:XXXXX/core/graph/output-lurodrig/clone]

1060416 [qtp1794568502-58] DEBUG org.apache.http.client.protocol.RequestAddCookies  - Cookie [version: 0][name: _csrf_token][value: XXXXXXXX][domain: PGXSERVER.cern.ch][path: null][expiry: null] match [PGXSERVER.cern.ch:XXXX/core/graph/output-lurodrig/clone]

1060418 [qtp1794568502-58] DEBUG org.apache.http.impl.execchain.MainClientExec  - Target auth state: UNCHALLENGED

1060418 [qtp1794568502-58] DEBUG org.apache.http.impl.execchain.MainClientExec  - Proxy auth state: UNCHALLENGED

1060418 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 >> POST /core/graph/output-lurodrig/clone HTTP/1.1

1060418 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 >> Content-Length: 116

1060418 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 >> Content-Type: application/json; charset=UTF-8

1060418 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 >> Host: PGXSERVER.cern.ch:XXXXX

1060418 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 >> Connection: Keep-Alive

1060418 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 >> User-Agent: Apache-HttpClient/4.3.6 (java 1.5)

1060418 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 >> Cookie: SID=XXXXXXXX; _csrf_token=XXXXXXXX

1060418 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 >> Cookie2: $Version=1

1060418 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 >> Accept-Encoding: gzip,deflate

1060418 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 >> "POST /core/graph/output-lurodrig/clone HTTP/1.1[\r][\n]"

1060418 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 >> "Content-Length: 116[\r][\n]"

1060418 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 >> "Content-Type: application/json; charset=UTF-8[\r][\n]"

1060418 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 >> "Host:PGXSERVER.cern.ch:XXXXX[\r][\n]"

1060418 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 >> "Connection: Keep-Alive[\r][\n]"

1060418 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 >> "User-Agent: Apache-HttpClient/4.3.6 (java 1.5)[\r][\n]"

1060418 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 >> "Cookie: SID=XXXXXXXXX; _csrf_token=XXXXXX[\r][\n]"

1060418 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 >> "Cookie2: $Version=1[\r][\n]"

1060418 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 >> "Accept-Encoding: gzip,deflate[\r][\n]"

1060418 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 >> "[\r][\n]"

1060418 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 >> "{"nodePropNames":null,"edgePropNames":null,"newGraphName":null,"_csrf_token":"XXXXXXXXXXX"}"

1060440 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 << "HTTP/1.1 201 Created[\r][\n]"

1060440 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 << "Server: Apache-Coyote/1.1[\r][\n]"

1060440 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 << "Content-Type: application/json;charset=utf-8[\r][\n]"

1060440 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 << "Content-Length: 51[\r][\n]"

1060440 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 << "Date: Tue, 12 Sep 2017 16:05:10 GMT[\r][\n]"

1060440 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 << "[\r][\n]"

1060440 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 << HTTP/1.1 201 Created

1060440 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 << Server: Apache-Coyote/1.1

1060440 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 << Content-Type: application/json;charset=utf-8

1060440 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 << Content-Length: 51

1060440 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 << Date: Tue, 12 Sep 2017 16:05:10 GMT

1060441 [qtp1794568502-58] DEBUG org.apache.http.impl.execchain.MainClientExec  - Connection can be kept alive indefinitely

1060441 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 << "{"futureId":"185e1d53-a9ec-4893-aed9-bb1ad7cfa372"}"

1060441 [qtp1794568502-58] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager  - Connection [id: 2][route: {}->http://PGXSERVER.cern.ch:XXXXX] can be kept alive indefinitely

1060441 [qtp1794568502-58] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager  - Connection released: [id: 2][route: {}->http://PGXSERVER.cern.ch:XXXXX][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]

1060441 [qtp1794568502-58] DEBUG oracle.pgx.client.RemoteUtils  - received HTTP status 201

1060441 [qtp1794568502-58] DEBUG oracle.pgx.client.RemoteUtils  - {"futureId":"185e1d53-a9ec-4893-aed9-bb1ad7cfa372"}

1060441 [pgx-client-thread-3] DEBUG oracle.pgx.client.PgxRemoteFuture  - Requesting GET http://@PGXSERVER.cern.ch:XXXXX/future/core/185e1d53-a9ec-4893-aed9-bb1ad7cfa372//@PGXSERVER.cern.ch:XXXXX/future/core/185e1d53-a9ec-4893-aed9-bb1ad7cfa372 HTTP/1.1

1060442 [pgx-client-thread-3] DEBUG org.apache.http.client.protocol.RequestAddCookies  - CookieSpec selected: best-match

1060442 [pgx-client-thread-3] DEBUG org.apache.http.client.protocol.RequestAddCookies  - Cookie [version: 0][name: SID][value: XXXXXXXXX][domain:PGXSERVER.cern.ch][path: null][expiry: null] match PGXSERVER.cern.ch:XXXX/future/core/185e1d53-a9ec-4893-aed9-bb1ad7cfa372]

1060442 [pgx-client-thread-3] DEBUG org.apache.http.client.protocol.RequestAddCookies  - Cookie [version: 0][name: _csrf_token][value:XXXXXXXX][domain: PGXSERVER.cern.ch][path: null][expiry: null] match [PGXSERVER.cern.ch:XXXX/future/core/185e1d53-a9ec-4893-aed9-bb1ad7cfa372]

1060442 [pgx-client-thread-3] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager  - Connection request: [route: {}->http://PGXSERVER.cern.ch:XXXXX7][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]

1060442 [pgx-client-thread-3] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager  - Connection leased: [id: 2][route: {}->http://PGXSERVER.cern.ch:XXXX][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]

1060442 [pgx-client-thread-3] DEBUG org.apache.http.impl.execchain.MainClientExec  - Stale connection check

1060443 [pgx-client-thread-3] DEBUG org.apache.http.wire  - http-outgoing-2 << "[read] I/O error: Read timed out"

1060443 [pgx-client-thread-3] DEBUG org.apache.http.impl.execchain.MainClientExec  - Executing request GET /future/core/185e1d53-a9ec-4893-aed9-bb1ad7cfa372 HTTP/1.1

1060443 [pgx-client-thread-3] DEBUG org.apache.http.impl.execchain.MainClientExec  - Target auth state: UNCHALLENGED

1060443 [pgx-client-thread-3] DEBUG org.apache.http.impl.execchain.MainClientExec  - Proxy auth state: UNCHALLENGED

1060444 [pgx-client-thread-3] DEBUG org.apache.http.headers  - http-outgoing-2 >> GET /future/core/185e1d53-a9ec-4893-aed9-bb1ad7cfa372 HTTP/1.1

1060444 [pgx-client-thread-3] DEBUG org.apache.http.headers  - http-outgoing-2 >> Host: PGXSERVER.cern.ch:XXXX

1060444 [pgx-client-thread-3] DEBUG org.apache.http.headers  - http-outgoing-2 >> Connection: Keep-Alive

1060444 [pgx-client-thread-3] DEBUG org.apache.http.headers  - http-outgoing-2 >> User-Agent: Apache-HttpClient/4.3.6 (java 1.5)

1060444 [pgx-client-thread-3] DEBUG org.apache.http.headers  - http-outgoing-2 >> Cookie: SID=XXXXXXX; _csrf_token=XXXXXXXXX

1060444 [pgx-client-thread-3] DEBUG org.apache.http.headers  - http-outgoing-2 >> Cookie2: $Version=1

1060444 [pgx-client-thread-3] DEBUG org.apache.http.headers  - http-outgoing-2 >> Accept-Encoding: gzip,deflate

1060444 [pgx-client-thread-3] DEBUG org.apache.http.wire  - http-outgoing-2 >> "GET /future/core/185e1d53-a9ec-4893-aed9-bb1ad7cfa372 HTTP/1.1[\r][\n]"

1060444 [pgx-client-thread-3] DEBUG org.apache.http.wire  - http-outgoing-2 >> "Host: PGXSERVER.cern.ch:XXXXX[\r][\n]"

1060444 [pgx-client-thread-3] DEBUG org.apache.http.wire  - http-outgoing-2 >> "Connection: Keep-Alive[\r][\n]"

1060444 [pgx-client-thread-3] DEBUG org.apache.http.wire  - http-outgoing-2 >> "User-Agent: Apache-HttpClient/4.3.6 (java 1.5)[\r][\n]"

1060444 [pgx-client-thread-3] DEBUG org.apache.http.wire  - http-outgoing-2 >> "Cookie: SID=XXXXXXXXX; _csrf_token=XXXXXXXXX[\r][\n]"

1060444 [pgx-client-thread-3] DEBUG org.apache.http.wire  - http-outgoing-2 >> "Cookie2: $Version=1[\r][\n]"

1060444 [pgx-client-thread-3] DEBUG org.apache.http.wire  - http-outgoing-2 >> "Accept-Encoding: gzip,deflate[\r][\n]"

1060444 [pgx-client-thread-3] DEBUG org.apache.http.wire  - http-outgoing-2 >> "[\r][\n]"

1060657 [pgx-client-thread-3] DEBUG org.apache.http.wire  - http-outgoing-2 << "HTTP/1.1 200 OK[\r][\n]"

1060657 [pgx-client-thread-3] DEBUG org.apache.http.wire  - http-outgoing-2 << "Server: Apache-Coyote/1.1[\r][\n]"

1060657 [pgx-client-thread-3] DEBUG org.apache.http.wire  - http-outgoing-2 << "Content-Type: application/json;charset=utf-8[\r][\n]"

1060657 [pgx-client-thread-3] DEBUG org.apache.http.wire  - http-outgoing-2 << "Content-Length: 568[\r][\n]"

1060657 [pgx-client-thread-3] DEBUG org.apache.http.wire  - http-outgoing-2 << "Date: Tue, 12 Sep 2017 16:05:10 GMT[\r][\n]"

1060657 [pgx-client-thread-3] DEBUG org.apache.http.wire  - http-outgoing-2 << "[\r][\n]"

1060658 [pgx-client-thread-3] DEBUG org.apache.http.headers  - http-outgoing-2 << HTTP/1.1 200 OK

1060658 [pgx-client-thread-3] DEBUG org.apache.http.headers  - http-outgoing-2 << Server: Apache-Coyote/1.1

1060658 [pgx-client-thread-3] DEBUG org.apache.http.headers  - http-outgoing-2 << Content-Type: application/json;charset=utf-8

1060658 [pgx-client-thread-3] DEBUG org.apache.http.headers  - http-outgoing-2 << Content-Length: 568

1060658 [pgx-client-thread-3] DEBUG org.apache.http.headers  - http-outgoing-2 << Date: Tue, 12 Sep 2017 16:05:10 GMT

1060658 [pgx-client-thread-3] DEBUG org.apache.http.impl.execchain.MainClientExec  - Connection can be kept alive indefinitely

1060658 [pgx-client-thread-3] DEBUG org.apache.http.wire  - http-outgoing-2 << "{"graphName":"output-lurodrig_sub-graph_1","vertexLabels":null,"edgeLabel":null,"metaData":{"numVertices":231017,"numEdges":644547,"memoryMb":23,"dataSourceVersion":null,"config":null,"creationRequestTimestamp":1505232310458,"creationTimestamp":1505232310666,"vertexIdType":"string","edgeIdType":"long","directed":true},"ageMs":0,"nodeProperties":{"type":{"dimension":0,"name":"type","entityType":"vertex","type":"string","transient":true},"url":{"dimension":0,"name":"url","entityType":"vertex","type":"string","transient":true}},"edgeProperties":{},"transient":true}"

1060658 [pgx-client-thread-3] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager  - Connection [id: 2][route: {}->http://PGXSERVER.cern.ch:XXXX] can be kept alive indefinitely

1060658 [pgx-client-thread-3] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager  - Connection released: [id: 2][route: {}->http://PGXSERVER.cern.ch:XXXX][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]

1060658 [pgx-client-thread-3] DEBUG oracle.pgx.client.RemoteUtils  - received HTTP status 200

1060658 [pgx-client-thread-3] DEBUG oracle.pgx.client.RemoteUtils  - {"graphName":"output-lurodrig_sub-graph_1","vertexLabels":null,"edgeLabel":null,"metaData":{"numVertices":231017,"numEdges":644547,"memoryMb":23,"dataSourceVersion":null,"config":null,"creationRequestTimestamp":1505232310458,"creationTimestamp":1505232310666,"vertexIdType":"string","edgeIdType":"long","directed":true},"ageMs":0,"nodeProperties":{"type":{"dimension":0,"name":"type","entityType":"vertex","type":"string","transient":true},"url":{"dimension":0,"name":"url","entityType":"vertex","type":"string","transient":true}},"edgeProperties":{},"transient":true}

1060670 [qtp1794568502-58] DEBUG oracle.pgx.client.RemoteUtils  - create session cookie (session ID = XXXXXXXX)

1060670 [qtp1794568502-58] DEBUG oracle.pgx.client.RemoteUtils  - create csrf token cookie (token = XXXXXXXXX)

1060671 [qtp1794568502-58] DEBUG oracle.pgx.client.RemoteUtils  - Requesting POST http://@PGXSERVER.cern.ch:XXXX/core/graph/output-lurodrig_sub-graph_1/query//@PGXSERVER.cern.ch:XXXX/core/graph/output-lurodrig_sub-graph_1/query HTTP/1.1 with payload {"pgqlQuery":"SELECT x WHERE (x WITH type='keyword' AND id() = 'electron')","semantic":null,"_csrf_token":"XXXXXXXXX"}

1060671 [qtp1794568502-58] DEBUG org.apache.http.client.protocol.RequestAddCookies  - CookieSpec selected: best-match

1060671 [qtp1794568502-58] DEBUG org.apache.http.client.protocol.RequestAddCookies  - Cookie [version: 0][name: SID][value: XXXXXXXX][domain: PGXSERVER.cern.ch][path: null][expiry: null] match [PGXSERVER.cern.ch:XXXX/core/graph/output-lurodrig_sub-graph_1/query]

1060671 [qtp1794568502-58] DEBUG org.apache.http.client.protocol.RequestAddCookies  - Cookie [version: 0][name: _csrf_token][value: XXXXXXXX][domain: PGXSERVER.cern.ch][path: null][expiry: null] match [PGXSERVER.cern.ch:XXXX/core/graph/output-lurodrig_sub-graph_1/query]

1060671 [qtp1794568502-58] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager  - Connection request: [route: {}->http://PGXSERVER.cern.ch:XXXX][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]

1060671 [qtp1794568502-58] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager  - Connection leased: [id: 2][route: {}->http://PGXSERVER.cern.ch:XXXX][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]

1060671 [qtp1794568502-58] DEBUG org.apache.http.impl.execchain.MainClientExec  - Stale connection check

1060672 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 << "[read] I/O error: Read timed out"

1060672 [qtp1794568502-58] DEBUG org.apache.http.impl.execchain.MainClientExec  - Executing request POST /core/graph/output-lurodrig_sub-graph_1/query HTTP/1.1

1060672 [qtp1794568502-58] DEBUG org.apache.http.impl.execchain.MainClientExec  - Target auth state: UNCHALLENGED

1060672 [qtp1794568502-58] DEBUG org.apache.http.impl.execchain.MainClientExec  - Proxy auth state: UNCHALLENGED

1060672 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 >> POST /core/graph/output-lurodrig_sub-graph_1/query HTTP/1.1

1060672 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 >> Content-Length: 145

1060672 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 >> Content-Type: application/json; charset=UTF-8

1060672 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 >> Host: PGXSERVER.cern.ch:XXXX

1060672 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 >> Connection: Keep-Alive

1060672 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 >> User-Agent: Apache-HttpClient/4.3.6 (java 1.5)

1060672 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 >> Cookie: SID=XXXXXXXX; _csrf_token=XXXXXXXX

1060672 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 >> Cookie2: $Version=1

1060672 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 >> Accept-Encoding: gzip,deflate

1060672 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 >> "POST /core/graph/output-lurodrig_sub-graph_1/query HTTP/1.1[\r][\n]"

1060672 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 >> "Content-Length: 145[\r][\n]"

1060672 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 >> "Content-Type: application/json; charset=UTF-8[\r][\n]"

1060672 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 >> "Host: PGXSERVER.cern.ch:XXXX[\r][\n]"

1060672 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 >> "Connection: Keep-Alive[\r][\n]"

1060672 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 >> "User-Agent: Apache-HttpClient/4.3.6 (java 1.5)[\r][\n]"

1060672 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 >> "Cookie: SID=XXXXXXXX; _csrf_token=XXXXXXXX[\r][\n]"

1060672 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 >> "Cookie2: $Version=1[\r][\n]"

1060672 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 >> "Accept-Encoding: gzip,deflate[\r][\n]"

1060672 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 >> "[\r][\n]"

1060672 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 >> "{"pgqlQuery":"SELECT x WHERE (x WITH type='keyword' AND id() = 'electron')","semantic":null,"_csrf_token":"XXXXXXXX"}"

1060683 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 << "HTTP/1.1 405 Method Not Allowed[\r][\n]"

1060683 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 << "Server: Apache-Coyote/1.1[\r][\n]"

1060683 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 << "Content-Type: application/json;charset=utf-8[\r][\n]"

1060683 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 << "Content-Length: 62[\r][\n]"

1060683 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 << "Date: Tue, 12 Sep 2017 16:05:10 GMT[\r][\n]"

1060683 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 << "[\r][\n]"

1060683 [qtp1794568502-58] DEBUG org.apache.http.wire  - http-outgoing-2 << "{"code":"bad_request","message":"HTTP 405 Method Not Allowed"}"

1060683 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 << HTTP/1.1 405 Method Not Allowed

1060683 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 << Server: Apache-Coyote/1.1

1060683 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 << Content-Type: application/json;charset=utf-8

1060683 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 << Content-Length: 62

1060683 [qtp1794568502-58] DEBUG org.apache.http.headers  - http-outgoing-2 << Date: Tue, 12 Sep 2017 16:05:10 GMT

1060683 [qtp1794568502-58] DEBUG org.apache.http.impl.execchain.MainClientExec  - Connection can be kept alive indefinitely

1060683 [qtp1794568502-58] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager  - Connection [id: 2][route: {}->http://PGXSERVER.cern.ch:XXXX] can be kept alive indefinitely

1060683 [qtp1794568502-58] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager  - Connection released: [id: 2][route: {}->http://PGXSERVER.cern.ch:XXXX][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]

1060684 [qtp1794568502-58] DEBUG oracle.pgx.client.RemoteUtils  - received HTTP status 405

1060684 [qtp1794568502-58] DEBUG oracle.pgx.client.RemoteUtils  - {"code":"bad_request","message":"HTTP 405 Method Not Allowed"}

1060685 [qtp1794568502-58] DEBUG oracle.pgx.common.marshalers.ExceptionMarshaler  - code: bad_request, message: HTTP 405 Method Not Allowed

1060687 [qtp1794568502-58] DEBUG oracle.pgx.api.PgxFuture  - oracle.pgx.api.PgxFuture@322a9807[Completed exceptionally] completed exceptionally (cause IllegalArgumentException)

1060687 [qtp1794568502-58] DEBUG oracle.pgx.api.PgxFuture  - oracle.pgx.api.PgxFuture@61a4a63f[Completed exceptionally] either already started or is done -> rollback

java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: HTTP 405 Method Not Allowed

    at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)

    at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)

    at oracle.pgx.api.PgxFuture.get(PgxFuture.java:99)

    at oracle.pgx.api.PgxGraph.queryPgql(PgxGraph.java:2883)

    at ZenodoAddon.Graph.Pgx.PlainKeywordVertexFinder.find(PlainKeywordVertexFinder.scala:20)

    at ZenodoAddon.Graph.Pgx.PlainKeywordVertexFinder.find(PlainKeywordVertexFinder.scala:10)

    at ZenodoAddon.Graph.Pgx.DistanceKeywordProximityRanker.$anonfun$rank$1(DistanceKeywordProximityRanker.scala:30)

    at scala.collection.immutable.List.map(List.scala:283)

    at ZenodoAddon.Graph.Pgx.DistanceKeywordProximityRanker.rank(DistanceKeywordProximityRanker.scala:29)

    at ZenodoAddon.Graph.Pgx.DistanceKeywordProximityRanker.rank(DistanceKeywordProximityRanker.scala:11)

    at ZenodoAddon.Graph.Runner.$anonfun$query$3(Runner.scala:160)

    at ZenodoAddon.Graph.QueryAddons.CacheAddon.unconditionalPipeline(CacheAddon.scala:172)

    at ZenodoAddon.Graph.Runner.$anonfun$addonOverlayKeywordRecommendRequest$2(Runner.scala:91)

    at ZenodoAddon.Graph.QueryAddons.CacheAddon.pipeline(CacheAddon.scala:148)

    at ZenodoAddon.Graph.Runner.$anonfun$addonOverlayKeywordRecommendRequest$4(Runner.scala:102)

    at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:122)

    at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:118)

    at scala.collection.immutable.List.foldLeft(List.scala:86)

    at ZenodoAddon.Graph.Runner.addonOverlayKeywordRecommendRequest(Runner.scala:98)

    at ZenodoAddon.Graph.Runner.$anonfun$query$1(Runner.scala:155)

    at scala.util.Try$.apply(Try.scala:209)

    at ZenodoAddon.Graph.Runner.query(Runner.scala:112)

    at ZenodoAddon.Main$.$anonfun$setupServer$14(Main.scala:91)

    at scala.util.Success.flatMap(Try.scala:247)

    at ZenodoAddon.Main$.recommendationHandler$1(Main.scala:91)

    at ZenodoAddon.Main$.$anonfun$setupServer$15(Main.scala:117)

    at spark.RouteImpl$1.handle(RouteImpl.java:72)

    at spark.http.matching.Routes.execute(Routes.java:61)

    at spark.http.matching.MatcherFilter.doFilter(MatcherFilter.java:130)

    at spark.embeddedserver.jetty.JettyHandler.doHandle(JettyHandler.java:50)

    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1568)

    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)

    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)

    at org.eclipse.jetty.server.Server.handle(Server.java:564)

    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)

    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)

    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)

    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)

    at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)

    at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)

    at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)

    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)

    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:126)

    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)

    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)

    at java.lang.Thread.run(Thread.java:748)

Caused by: java.lang.IllegalArgumentException: HTTP 405 Method Not Allowed

    at oracle.pgx.common.marshalers.ExceptionMarshaler.toUnserializedException(ExceptionMarshaler.java:70)

    at oracle.pgx.common.marshalers.ExceptionMarshaler.unmarshal(ExceptionMarshaler.java:102)

    at oracle.pgx.client.RemoteUtils.parseExceptionalResponse(RemoteUtils.java:116)

    at oracle.pgx.client.RemoteUtils.getResponseContent(RemoteUtils.java:81)

    at oracle.pgx.client.RemoteUtils.parse(RemoteUtils.java:139)

    at oracle.pgx.client.RemoteUtils.post(RemoteUtils.java:188)

    at oracle.pgx.client.RemoteCoreImpl$73.request(RemoteCoreImpl.java:1833)

    at oracle.pgx.client.RemoteCoreImpl$CoreRequest.request(RemoteCoreImpl.java:273)

    at oracle.pgx.client.RemoteCoreImpl$CoreRequest.request(RemoteCoreImpl.java:264)

    at oracle.pgx.client.AbstractFutureRequest.execute(AbstractFutureRequest.java:42)

    at oracle.pgx.client.RemoteCoreImpl.request(RemoteCoreImpl.java:257)

    at oracle.pgx.client.RemoteCoreImpl.queryPgql(RemoteCoreImpl.java:1820)

    at oracle.pgx.api.PgxGraph.queryPgqlAsync(PgxGraph.java:1800)

    at oracle.pgx.api.PgxGraph.queryPgqlAsync(PgxGraph.java:1812)

    ... 43 more

And in the server side:

12:05:10,431 DEBUG CsrfTokenValidator - received content type application/json; charset=UTF-8

12:05:10,441 INFO CoreEndpoint - clone graph id output-lurodrig with params {"nodePropNames":null,"edgePropNames":null,"newGraphName":null,"_csrf_token":"xxxxxxx"}

12:05:10,449 INFO Server - start task CLONE_GRAPH

12:05:10,449 DEBUG Task - submit CLONE_GRAPH to analysis-pool

12:05:10,450 DEBUG Task -xxxxxx START ====> CLONE_GRAPH

12:05:10,451 DEBUG Task - task CLONE_GRAPH acquires WRITE lock for session

12:05:10,454 DEBUG MutationManager - simplify graph output-lurodrig

12:05:10,458 DEBUG MutationManager$Mutation - update 2 node props and 0 edge props after mutation

12:05:10,485 DEBUG UnsafeDataStructureFactory - No unsafe array implementation for class java.lang.String. Using fallback java array.

12:05:10,487 DEBUG StringPool - Creating new String pool with policy: LimitedPoolingPolicy

12:05:10,501 DEBUG UnsafeDataStructureFactory - No unsafe array implementation for class java.lang.String. Using fallback java array.

12:05:10,502 DEBUG StringPool - Creating new String pool with policy: LimitedPoolingPolicy

12:05:10,666 DEBUG MutationManager$Mutation - adding new private graph output-lurodrig_sub-graph_1

12:05:10,666 DEBUG Task - task CLONE_GRAPH unlocks (WRITE) session

12:05:10,667 DEBUG Task - xxxxxxxx FINISHED => CLONE_GRAPH: total task exec time = 216 ms (0 secs)

12:05:10,684 DEBUG CsrfTokenValidator - received content type application/json; charset=UTF-8

12:05:10,688 DEBUG AbstractExceptionMapper - exception mapper caught exception

javax.ws.rs.NotAllowedException: HTTP 405 Method Not Allowed

    at org.glassfish.jersey.server.internal.routing.MethodSelectingRouter.getMethodRouter(MethodSelectingRouter.java:514)

    at org.glassfish.jersey.server.internal.routing.MethodSelectingRouter.access$300(MethodSelectingRouter.java:94)

    at org.glassfish.jersey.server.internal.routing.MethodSelectingRouter$4.apply(MethodSelectingRouter.java:814)

    at org.glassfish.jersey.server.internal.routing.MethodSelectingRouter.apply(MethodSelectingRouter.java:419)

    at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:112)

    at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:116)

    at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:116)

    at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:116)

    at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:94)

    at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:63)

    at org.glassfish.jersey.process.internal.Stages.process(Stages.java:197)

    at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:295)

    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)

    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)

    at org.glassfish.jersey.internal.Errors.process(Errors.java:315)

    at org.glassfish.jersey.internal.Errors.process(Errors.java:297)

    at org.glassfish.jersey.internal.Errors.process(Errors.java:267)

    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:316)

    at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:286)

    at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1073)

    at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:377)

    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:381)

    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:344)

    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)

    at oracle.pgx.rest.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:44)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)

    at oracle.pgx.rest.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:44)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)

    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)

    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)

    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:509)

    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104)

    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)

    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1524)

    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1480)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

    at java.lang.Thread.run(Thread.java:745)

12:05:10,691 DEBUG AbstractExceptionMapper - mapped to IllegalArgumentException

java.lang.IllegalArgumentException: HTTP 405 Method Not Allowed

    at oracle.pgx.common.marshalers.ExceptionMarshaler.toUnserializedException(ExceptionMarshaler.java:64)

    at oracle.pgx.rest.mapper.AbstractWebApplicationExceptionMapper.mapException(AbstractWebApplicationExceptionMapper.java:32)

    at oracle.pgx.rest.mapper.AbstractWebApplicationExceptionMapper.mapException(AbstractWebApplicationExceptionMapper.java:11)

    at oracle.pgx.rest.mapper.AbstractExceptionMapper.toResponse(AbstractExceptionMapper.java:95)

    at org.glassfish.jersey.server.ServerRuntime$Responder.mapException(ServerRuntime.java:569)

    at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:450)

    at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:311)

    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)

    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)

    at org.glassfish.jersey.internal.Errors.process(Errors.java:315)

    at org.glassfish.jersey.internal.Errors.process(Errors.java:297)

    at org.glassfish.jersey.internal.Errors.process(Errors.java:267)

    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:316)

    at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:286)

    at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1073)

    at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:377)

    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:381)

    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:344)

    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)

    at oracle.pgx.rest.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:44)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)

    at oracle.pgx.rest.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:44)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)

    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)

    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)

    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:509)

    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104)

    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)

    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1524)

    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1480)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

    at java.lang.Thread.run(Thread.java:745)

12:07:10,562 DEBUG Task - submit MEMORY_CLEANUP to server-thread

12:07:10,562 DEBUG Task - internal queue START ====> MEMORY_CLEANUP

12:07:10,562 DEBUG Task - internal queue FINISHED => MEMORY_CLEANUP: total task exec time = 0 ms (0 secs)

12:17:10,562 DEBUG Task - submit MEMORY_CLEANUP to server-thread

12:17:10,563 DEBUG Task - internal queue START ====> MEMORY_CLEANUP

12:17:10,563 DEBUG Task - internal queue FINISHED => MEMORY_CLEANUP: total task exec time = 0 ms (0 secs)

You can find the source code of our API here, BTW thank you very much Alastair Pagaras!

Are we missing something?

Thanks in advance,

Luis

This post has been answered by Luis Rodriguez Fernandez on Sep 14 2017
Jump to Answer
Comments
Post Details
Added on Sep 12 2017
7 comments
2,260 views