有人知道为什么当我调用Google Cloud Endpoint时,会在我的应用程序引擎实例被实际访问之前就抛出"unexpected end of stream"异常吗?每次调用我的端点时,我都会收到以下错误。在大多数情况下,该错误出现在其他每个调用之后;在少数情况下,它是一致的。
05-06 18:32:28.335: W/System.err(11783): java.io.IOException: unexpected end of stream
05-06 18:32:28.343: W/System.err(11783): at libcore.net.http.FixedLengthOutputStream.close(FixedLengthOutputStream.java:58)
05-06 18:32:28.343: W/System.err(11783): at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:82)
05-06 18:32:28.343: W/System.err(11783): at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:980)
05-06 18:32:28.343: W/System.err(11783): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:412)
05-06 18:32:28.343: W/System.err(11783): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:345)
05-06 18:32:28.343: W/System.err(11783): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:463)
…
05-06 18:32:28.343: W/System.err(11783): at android.os.AsyncTask.finish(AsyncTask.java:631)
05-06 18:32:28.343: W/System.err(11783): at android.os.AsyncTask.access$600(AsyncTask.java:177)
05-06 18:32:28.343: W/System.err(11783): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
05-06 18:32:28.343: W/System.err(11783): at android.os.Handler.dispatchMessage(Handler.java:99)
05-06 18:32:28.343: W/System.err(11783): at android.os.Looper.loop(Looper.java:137)
05-06 18:32:28.343: W/System.err(11783): at android.app.ActivityThread.main(ActivityThread.java:4849)
05-06 18:32:28.343: W/System.err(11783): at java.lang.reflect.Method.invokeNative(Native Method)
05-06 18:32:28.343: W/System.err(11783): at java.lang.reflect.Method.invoke(Method.java:511)
05-06 18:32:28.343: W/System.err(11783): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
05-06 18:32:28.343: W/System.err(11783): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
05-06 18:32:28.343: W/System.err(11783): at dalvik.system.NativeStart.main(Native Method)
顺便说一下:我甚至在执行小操作(例如验证一个令牌,可能是一个20到50个字符的字符串)时也会遇到此错误。