asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Murtadha Hubail (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ASTERIXDB-2122) Invalid JSON is Returned on Exception While Reading Results
Date Wed, 04 Oct 2017 02:32:00 GMT

     [ https://issues.apache.org/jira/browse/ASTERIXDB-2122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Murtadha Hubail updated ASTERIXDB-2122:
---------------------------------------
    Description: 
QueryService and the Rest AP return invalid JSON if any exception happens while reading the
result.
Example:

{code:java}
Caused by: com.fasterxml.jackson.core.JsonParseException: 
Unexpected character (':' (code 58)): was expecting comma to separate Array entries
 at [Source: {
	"requestID": "1bebc7b2-a2fa-4fec-a70f-ebdc0f978a7c",
	"signature": "*",
	"type": "application/x-adm",
	"results": [ 	"errors": [
	"code": 1,
	"msg": "IPCException: Cannot send on a closed handle"
	}],
	"status": "fatal",
	"metrics": {
		"elapsedTime": "170.240113ms",
		"executionTime": "167.497012ms",
		"resultCount": 0,
		"resultSize": 0,
		"processedObjects": 1412,
			"errorCount": 1
	}
}
{code}

Stacktrace:

{code:java}
org.apache.hyracks.ipc.exceptions.IPCException: Cannot send on a closed handle
org.apache.hyracks.api.exceptions.HyracksDataException: org.apache.hyracks.ipc.exceptions.IPCException:
Cannot send on a closed handle
	at org.apache.hyracks.api.exceptions.HyracksDataException.create(HyracksDataException.java:47)
~[hyracks-api-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	at org.apache.hyracks.client.dataset.HyracksDatasetReader.nextPartition(HyracksDatasetReader.java:130)
~[hyracks-client-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	at org.apache.hyracks.client.dataset.HyracksDatasetReader.read(HyracksDatasetReader.java:141)
~[hyracks-client-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	at org.apache.asterix.app.result.ResultReader.read(ResultReader.java:49) ~[asterix-app-0.9.3-SNAPSHOT.jar:0.9.3-SNAPSHOT]
	at org.apache.asterix.app.result.ResultPrinter.print(ResultPrinter.java:207) ~[asterix-app-0.9.3-SNAPSHOT.jar:0.9.3-SNAPSHOT]
	at org.apache.asterix.api.http.server.ResultUtil.printResults(ResultUtil.java:81) ~[asterix-app-0.9.3-SNAPSHOT.jar:0.9.3-SNAPSHOT]
	at org.apache.asterix.api.http.server.NCQueryServiceServlet.executeStatement(NCQueryServiceServlet.java:125)
[asterix-app-0.9.3-SNAPSHOT.jar:0.9.3-SNAPSHOT]
	at org.apache.asterix.api.http.server.QueryServiceServlet.handleRequest(QueryServiceServlet.java:411)
[asterix-app-0.9.3-SNAPSHOT.jar:0.9.3-SNAPSHOT]
	at org.apache.asterix.api.http.server.QueryServiceServlet.post(QueryServiceServlet.java:97)
[asterix-app-0.9.3-SNAPSHOT.jar:0.9.3-SNAPSHOT]
	at org.apache.hyracks.http.server.AbstractServlet.handle(AbstractServlet.java:90) [hyracks-http-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	at com.couchbase.analytics.servlet.AuthenticatedServlet.handle(AuthenticatedServlet.java:67)
[cbas-server-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
	at org.apache.hyracks.http.server.HttpRequestHandler.handle(HttpRequestHandler.java:70) [hyracks-http-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	at org.apache.hyracks.http.server.HttpRequestHandler.call(HttpRequestHandler.java:55) [hyracks-http-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	at org.apache.hyracks.http.server.HttpRequestHandler.call(HttpRequestHandler.java:36) [hyracks-http-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_131]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
Caused by: org.apache.hyracks.ipc.exceptions.IPCException: Cannot send on a closed handle
	at org.apache.hyracks.ipc.api.RPCInterface.call(RPCInterface.java:38) ~[hyracks-ipc-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	at org.apache.hyracks.client.dataset.HyracksDatasetDirectoryServiceInterfaceRemoteProxy.getDatasetResultLocations(HyracksDatasetDirectoryServiceInterfaceRemoteProxy.java:53)
~[hyracks-client-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	at org.apache.hyracks.client.dataset.HyracksDatasetDirectoryServiceConnection.getDatasetResultLocations(HyracksDatasetDirectoryServiceConnection.java:55)
~[hyracks-client-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	at org.apache.hyracks.client.dataset.HyracksDatasetReader.getRecord(HyracksDatasetReader.java:108)
~[hyracks-client-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	at org.apache.hyracks.client.dataset.HyracksDatasetReader.nextPartition(HyracksDatasetReader.java:116)
~[hyracks-client-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	... 16 more
{code}

  was:
QueryService and the Rest AP return invalid JSON if any exception happens while reading the
result.
Example:

{code:json}
// Some comments here
Caused by: com.fasterxml.jackson.core.JsonParseException: 
Unexpected character (':' (code 58)): was expecting comma to separate Array entries
 at [Source: {
	"requestID": "1bebc7b2-a2fa-4fec-a70f-ebdc0f978a7c",
	"signature": "*",
	"type": "application/x-adm",
	{color:red}"results": [ 	"errors": [{ {color}
	"code": 1,
	"msg": "IPCException: Cannot send on a closed handle"
	}],
	"status": "fatal",
	"metrics": {
		"elapsedTime": "170.240113ms",
		"executionTime": "167.497012ms",
		"resultCount": 0,
		"resultSize": 0,
		"processedObjects": 1412,
			"errorCount": 1
	}
}
{code}

Stacktrace:

{code:java}
org.apache.hyracks.ipc.exceptions.IPCException: Cannot send on a closed handle
org.apache.hyracks.api.exceptions.HyracksDataException: org.apache.hyracks.ipc.exceptions.IPCException:
Cannot send on a closed handle
	at org.apache.hyracks.api.exceptions.HyracksDataException.create(HyracksDataException.java:47)
~[hyracks-api-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	at org.apache.hyracks.client.dataset.HyracksDatasetReader.nextPartition(HyracksDatasetReader.java:130)
~[hyracks-client-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	at org.apache.hyracks.client.dataset.HyracksDatasetReader.read(HyracksDatasetReader.java:141)
~[hyracks-client-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	at org.apache.asterix.app.result.ResultReader.read(ResultReader.java:49) ~[asterix-app-0.9.3-SNAPSHOT.jar:0.9.3-SNAPSHOT]
	at org.apache.asterix.app.result.ResultPrinter.print(ResultPrinter.java:207) ~[asterix-app-0.9.3-SNAPSHOT.jar:0.9.3-SNAPSHOT]
	at org.apache.asterix.api.http.server.ResultUtil.printResults(ResultUtil.java:81) ~[asterix-app-0.9.3-SNAPSHOT.jar:0.9.3-SNAPSHOT]
	at org.apache.asterix.api.http.server.NCQueryServiceServlet.executeStatement(NCQueryServiceServlet.java:125)
[asterix-app-0.9.3-SNAPSHOT.jar:0.9.3-SNAPSHOT]
	at org.apache.asterix.api.http.server.QueryServiceServlet.handleRequest(QueryServiceServlet.java:411)
[asterix-app-0.9.3-SNAPSHOT.jar:0.9.3-SNAPSHOT]
	at org.apache.asterix.api.http.server.QueryServiceServlet.post(QueryServiceServlet.java:97)
[asterix-app-0.9.3-SNAPSHOT.jar:0.9.3-SNAPSHOT]
	at org.apache.hyracks.http.server.AbstractServlet.handle(AbstractServlet.java:90) [hyracks-http-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	at com.couchbase.analytics.servlet.AuthenticatedServlet.handle(AuthenticatedServlet.java:67)
[cbas-server-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
	at org.apache.hyracks.http.server.HttpRequestHandler.handle(HttpRequestHandler.java:70) [hyracks-http-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	at org.apache.hyracks.http.server.HttpRequestHandler.call(HttpRequestHandler.java:55) [hyracks-http-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	at org.apache.hyracks.http.server.HttpRequestHandler.call(HttpRequestHandler.java:36) [hyracks-http-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_131]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
Caused by: org.apache.hyracks.ipc.exceptions.IPCException: Cannot send on a closed handle
	at org.apache.hyracks.ipc.api.RPCInterface.call(RPCInterface.java:38) ~[hyracks-ipc-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	at org.apache.hyracks.client.dataset.HyracksDatasetDirectoryServiceInterfaceRemoteProxy.getDatasetResultLocations(HyracksDatasetDirectoryServiceInterfaceRemoteProxy.java:53)
~[hyracks-client-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	at org.apache.hyracks.client.dataset.HyracksDatasetDirectoryServiceConnection.getDatasetResultLocations(HyracksDatasetDirectoryServiceConnection.java:55)
~[hyracks-client-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	at org.apache.hyracks.client.dataset.HyracksDatasetReader.getRecord(HyracksDatasetReader.java:108)
~[hyracks-client-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	at org.apache.hyracks.client.dataset.HyracksDatasetReader.nextPartition(HyracksDatasetReader.java:116)
~[hyracks-client-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
	... 16 more
{code}


> Invalid JSON is Returned on Exception While Reading Results
> -----------------------------------------------------------
>
>                 Key: ASTERIXDB-2122
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2122
>             Project: Apache AsterixDB
>          Issue Type: Bug
>            Reporter: Murtadha Hubail
>
> QueryService and the Rest AP return invalid JSON if any exception happens while reading
the result.
> Example:
> {code:java}
> Caused by: com.fasterxml.jackson.core.JsonParseException: 
> Unexpected character (':' (code 58)): was expecting comma to separate Array entries
>  at [Source: {
> 	"requestID": "1bebc7b2-a2fa-4fec-a70f-ebdc0f978a7c",
> 	"signature": "*",
> 	"type": "application/x-adm",
> 	"results": [ 	"errors": [
> 	"code": 1,
> 	"msg": "IPCException: Cannot send on a closed handle"
> 	}],
> 	"status": "fatal",
> 	"metrics": {
> 		"elapsedTime": "170.240113ms",
> 		"executionTime": "167.497012ms",
> 		"resultCount": 0,
> 		"resultSize": 0,
> 		"processedObjects": 1412,
> 			"errorCount": 1
> 	}
> }
> {code}
> Stacktrace:
> {code:java}
> org.apache.hyracks.ipc.exceptions.IPCException: Cannot send on a closed handle
> org.apache.hyracks.api.exceptions.HyracksDataException: org.apache.hyracks.ipc.exceptions.IPCException:
Cannot send on a closed handle
> 	at org.apache.hyracks.api.exceptions.HyracksDataException.create(HyracksDataException.java:47)
~[hyracks-api-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
> 	at org.apache.hyracks.client.dataset.HyracksDatasetReader.nextPartition(HyracksDatasetReader.java:130)
~[hyracks-client-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
> 	at org.apache.hyracks.client.dataset.HyracksDatasetReader.read(HyracksDatasetReader.java:141)
~[hyracks-client-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
> 	at org.apache.asterix.app.result.ResultReader.read(ResultReader.java:49) ~[asterix-app-0.9.3-SNAPSHOT.jar:0.9.3-SNAPSHOT]
> 	at org.apache.asterix.app.result.ResultPrinter.print(ResultPrinter.java:207) ~[asterix-app-0.9.3-SNAPSHOT.jar:0.9.3-SNAPSHOT]
> 	at org.apache.asterix.api.http.server.ResultUtil.printResults(ResultUtil.java:81) ~[asterix-app-0.9.3-SNAPSHOT.jar:0.9.3-SNAPSHOT]
> 	at org.apache.asterix.api.http.server.NCQueryServiceServlet.executeStatement(NCQueryServiceServlet.java:125)
[asterix-app-0.9.3-SNAPSHOT.jar:0.9.3-SNAPSHOT]
> 	at org.apache.asterix.api.http.server.QueryServiceServlet.handleRequest(QueryServiceServlet.java:411)
[asterix-app-0.9.3-SNAPSHOT.jar:0.9.3-SNAPSHOT]
> 	at org.apache.asterix.api.http.server.QueryServiceServlet.post(QueryServiceServlet.java:97)
[asterix-app-0.9.3-SNAPSHOT.jar:0.9.3-SNAPSHOT]
> 	at org.apache.hyracks.http.server.AbstractServlet.handle(AbstractServlet.java:90) [hyracks-http-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
> 	at com.couchbase.analytics.servlet.AuthenticatedServlet.handle(AuthenticatedServlet.java:67)
[cbas-server-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
> 	at org.apache.hyracks.http.server.HttpRequestHandler.handle(HttpRequestHandler.java:70)
[hyracks-http-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
> 	at org.apache.hyracks.http.server.HttpRequestHandler.call(HttpRequestHandler.java:55)
[hyracks-http-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
> 	at org.apache.hyracks.http.server.HttpRequestHandler.call(HttpRequestHandler.java:36)
[hyracks-http-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_131]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]
> 	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
> Caused by: org.apache.hyracks.ipc.exceptions.IPCException: Cannot send on a closed handle
> 	at org.apache.hyracks.ipc.api.RPCInterface.call(RPCInterface.java:38) ~[hyracks-ipc-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
> 	at org.apache.hyracks.client.dataset.HyracksDatasetDirectoryServiceInterfaceRemoteProxy.getDatasetResultLocations(HyracksDatasetDirectoryServiceInterfaceRemoteProxy.java:53)
~[hyracks-client-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
> 	at org.apache.hyracks.client.dataset.HyracksDatasetDirectoryServiceConnection.getDatasetResultLocations(HyracksDatasetDirectoryServiceConnection.java:55)
~[hyracks-client-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
> 	at org.apache.hyracks.client.dataset.HyracksDatasetReader.getRecord(HyracksDatasetReader.java:108)
~[hyracks-client-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
> 	at org.apache.hyracks.client.dataset.HyracksDatasetReader.nextPartition(HyracksDatasetReader.java:116)
~[hyracks-client-0.3.3-SNAPSHOT.jar:0.3.3-SNAPSHOT]
> 	... 16 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message