falcon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samarth Gupta (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FALCON-323) Summary API deserialization fails if array has only one element
Date Wed, 26 Feb 2014 11:20:19 GMT
Samarth Gupta created FALCON-323:
------------------------------------

             Summary: Summary API deserialization fails if array has only one element 
                 Key: FALCON-323
                 URL: https://issues.apache.org/jira/browse/FALCON-323
             Project: Falcon
          Issue Type: Bug
         Environment: QA
            Reporter: Samarth Gupta
            Assignee: Suhas Vasu


if the summaryInstanceResult has only one element in the response array, 
the jersy deserialization fails. 

[InstanceUtil] [INFO] hitting the url: http://10.14.118.26:16000/api/instance/summary/process/agregator-coord16-c3ac8fcb-a647-439e-a550-dff5c5d30680/?start=2014-02-26T10:00Z&colo=*
[InstanceUtil] [INFO] The web service response status is 200
[InstanceUtil] [INFO] The web service response is: {"status":"SUCCEEDED","message":"ua1/SUMMARY\n","requestId":"ua1/1da3b27e-99c7-4320-9948-26f473dc53d3\n","instancesSummary":{"cluster":"corp-4cd5ff55-275e-4bac-8373-c332e64ad440","map":{"entry":{"key":"SUCCEEDED","value":"1"}}}}


com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY
but was BEGIN_OBJECT at line 1 column 126
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:180)
	at com.google.gson.Gson.fromJson(Gson.java:755)
	at com.google.gson.Gson.fromJson(Gson.java:721)
	at com.google.gson.Gson.fromJson(Gson.java:670)
	at com.google.gson.Gson.fromJson(Gson.java:642)
	at org.apache.falcon.regression.core.util.InstanceUtil.hitUrl(InstanceUtil.java:174)
	at org.apache.falcon.regression.core.util.InstanceUtil.sendRequestProcessInstance(InstanceUtil.java:108)
	at org.apache.falcon.regression.core.util.InstanceUtil.createAndsendRequestProcessInstance(InstanceUtil.java:1025)
	at org.apache.falcon.regression.core.helpers.ProcessEntityHelperImpl.getInstanceSummary(ProcessEntityHelperImpl.java:300)
	at org.apache.falcon.regression.InstanceSummaryTest.testSummarySingleClusterProcess(InstanceSummaryTest.java:125)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
	at org.testng.internal.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:46)
	at org.testng.internal.InvokeMethodRunnable.run(InvokeMethodRunnable.java:37)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line
1 column 126
	at com.google.gson.stream.JsonReader.expect(JsonReader.java:339)
	at com.google.gson.stream.JsonReader.beginArray(JsonReader.java:306)
	at com.google.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:70)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:176)
	... 22 more




--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message