使用HttpTransportSE.call()时抛出java.lang.ExceptionInInitializerError - KSoap2

时间:2013-12-30 12:41:59

标签: java android ksoap2

昨天我曾经使用相同的代码连接到webservice,这很好,今天当我开始连接它时(没有什么不同),我发现这个异常被抛出

我向你保证会抛出这部分代码

HttpTransportSE connection = new HttpTransportSE(url);
connection.call(soapAction, envelop);

我确信'url','soapAction'和'envelop'都没有改变。

12-30 14:28:23.923: E/AndroidRuntime(19409): FATAL EXCEPTION: AsyncTask #1
12-30 14:28:23.923: E/AndroidRuntime(19409): java.lang.RuntimeException: An error occured while executing doInBackground()
12-30 14:28:23.923: E/AndroidRuntime(19409):    at android.os.AsyncTask$3.done(AsyncTask.java:278)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at java.util.concurrent.FutureTask.run(FutureTask.java:137)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:208)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at java.lang.Thread.run(Thread.java:856)
12-30 14:28:23.923: E/AndroidRuntime(19409): Caused by: java.lang.ExceptionInInitializerError
12-30 14:28:23.923: E/AndroidRuntime(19409):    at java.util.TreeMap.find(TreeMap.java:328)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at java.util.TreeMap.findByObject(TreeMap.java:351)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at java.util.TreeMap.get(TreeMap.java:177)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at libcore.net.http.RawHeaders.toMultimap(RawHeaders.java:266)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at libcore.net.http.HttpURLConnectionImpl.getHeaderFields(HttpURLConnectionImpl.java:149)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at org.ksoap2.transport.ServiceConnectionSE.getResponseProperties(ServiceConnectionSE.java:84)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:167)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:95)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at com.dsociety.wrapper.WebServiceRequestImpl.connect(WebServiceRequestImpl.java:105)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at com.dsociety.wrapper.WebServiceRequestIntr.commit(WebServiceRequestIntr.java:85)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at com.dsociety.wrapper.WebServiceRequestIntr.fetchObject(WebServiceRequestIntr.java:59)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at com.dsociety.client.WebServiceClient.commitRequest(WebServiceClient.java:22)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at com.itg.implementation.model.ImplConnector.createWebServiceRequest(ImplConnector.java:20)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at com.itg.implementation.view.ImplLogin$LoginTask.doInBackground(ImplLogin.java:121)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at com.itg.implementation.view.ImplLogin$LoginTask.doInBackground(ImplLogin.java:1)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at android.os.AsyncTask$2.call(AsyncTask.java:264)
12-30 14:28:23.923: E/AndroidRuntime(19409):    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
12-30 14:28:23.923: E/AndroidRuntime(19409):    ... 5 more
12-30 14:28:23.923: E/AndroidRuntime(19409): Caused by:  java.lang.ExceptionInInitializerError
12-30 14:28:23.923: E/AndroidRuntime(19409):    at java.util.TreeMap$2.<clinit>(TreeMap.java:1245)
12-30 14:28:23.923: E/AndroidRuntime(19409):    ... 22 more
12-30 14:28:23.923: E/AndroidRuntime(19409): Caused by: java.lang.NoClassDefFoundError: [generic]
12-30 14:28:23.923: E/AndroidRuntime(19409):    at dalvik.system.NativeStart.main(Native Method)

1 个答案:

答案 0 :(得分:-1)

我重启了设备并且运行正常