我正在开发一个与Hessian Web服务通信的Android应用程序。它在启动后工作正常,但是当我再次调用网络功能时,我收到此错误:
08-21 14:27:24.712: E/AndroidRuntime(2170): FATAL EXCEPTION: AsyncTask #1
08-21 14:27:24.712: E/AndroidRuntime(2170): java.lang.RuntimeException: An error occured while executing doInBackground()
08-21 14:27:24.712: E/AndroidRuntime(2170): at android.os.AsyncTask$3.done(AsyncTask.java:299)
08-21 14:27:24.712: E/AndroidRuntime(2170): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
08-21 14:27:24.712: E/AndroidRuntime(2170): at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
08-21 14:27:24.712: E/AndroidRuntime(2170): at java.util.concurrent.FutureTask.run(FutureTask.java:239)
08-21 14:27:24.712: E/AndroidRuntime(2170): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
08-21 14:27:24.712: E/AndroidRuntime(2170): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
08-21 14:27:24.712: E/AndroidRuntime(2170): at java.lang.Thread.run(Thread.java:856)
08-21 14:27:24.712: E/AndroidRuntime(2170): Caused by: com.caucho.hessian.client.HessianConnectionException: 500: java.io.EOFException
08-21 14:27:24.712: E/AndroidRuntime(2170): at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:197)
08-21 14:27:24.712: E/AndroidRuntime(2170): at $Proxy2.getEventActionsCount(Native Method)
08-21 14:27:24.712: E/AndroidRuntime(2170): at com.example.hessian.EventServiceTask.doInBackground(EventServiceTask.java:69)
08-21 14:27:24.712: E/AndroidRuntime(2170): at com.example.hessian.EventServiceTask.doInBackground(EventServiceTask.java:1)
08-21 14:27:24.712: E/AndroidRuntime(2170): at android.os.AsyncTask$2.call(AsyncTask.java:287)
08-21 14:27:24.712: E/AndroidRuntime(2170): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
08-21 14:27:24.712: E/AndroidRuntime(2170): ... 3 more
08-21 14:27:24.712: E/AndroidRuntime(2170): Caused by: java.io.EOFException
08-21 14:27:24.712: E/AndroidRuntime(2170): at libcore.io.Streams.readAsciiLine(Streams.java:203)
08-21 14:27:24.712: E/AndroidRuntime(2170): at libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:573)
08-21 14:27:24.712: E/AndroidRuntime(2170): at libcore.net.http.HttpEngine.readResponse(HttpEngine.java:821)
08-21 14:27:24.712: E/AndroidRuntime(2170): at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:283)
08-21 14:27:24.712: E/AndroidRuntime(2170): at libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:495)
08-21 14:27:24.712: E/AndroidRuntime(2170): at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:167)
08-21 14:27:24.712: E/AndroidRuntime(2170): ... 8 more
在我的网络应用程序中,我正在使用spring remoting 2.5和Hessian 3.1,而在Android中,我正在使用Hessdroid,我从网上下载它。