问题
I am working on an android project which uses the webservice
I have created. It was working fine few minutes earlier but suddenly it started to give below error.
the source attachment does not contain the source for the file threadpoolexecutor.class
Logcat error is :
07-10 11:30:22.844: E/AndroidRuntime(1707): FATAL EXCEPTION: AsyncTask #1
07-10 11:30:22.844: E/AndroidRuntime(1707): java.lang.RuntimeException: An error occured while executing doInBackground()
07-10 11:30:22.844: E/AndroidRuntime(1707): at android.os.AsyncTask$3.done(AsyncTask.java:299)
07-10 11:30:22.844: E/AndroidRuntime(1707): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
07-10 11:30:22.844: E/AndroidRuntime(1707): at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
07-10 11:30:22.844: E/AndroidRuntime(1707): at java.util.concurrent.FutureTask.run(FutureTask.java:239)
07-10 11:30:22.844: E/AndroidRuntime(1707): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
07-10 11:30:22.844: E/AndroidRuntime(1707): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
07-10 11:30:22.844: E/AndroidRuntime(1707): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
07-10 11:30:22.844: E/AndroidRuntime(1707): at java.lang.Thread.run(Thread.java:856)
07-10 11:30:22.844: E/AndroidRuntime(1707): Caused by: java.lang.NullPointerException
07-10 11:30:22.844: E/AndroidRuntime(1707): at com.example.backgroundTask.BackgroundTask.RegisterUser(BackgroundTask.java:125)
07-10 11:30:22.844: E/AndroidRuntime(1707): at com.example.backgroundTask.BackgroundTask.doInBackground(BackgroundTask.java:65)
07-10 11:30:22.844: E/AndroidRuntime(1707): at com.example.backgroundTask.BackgroundTask.doInBackground(BackgroundTask.java:1)
07-10 11:30:22.844: E/AndroidRuntime(1707): at android.os.AsyncTask$2.call(AsyncTask.java:287)
07-10 11:30:22.844: E/AndroidRuntime(1707): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
07-10 11:30:22.844: E/AndroidRuntime(1707): ... 4 more
07-10 11:30:23.174: W/Trace(1707): Unexpected value from nativeGetEnabledTags: 0
Please tell me what may cause this error or let me know if more information required.
Thanks & Regards..
Sourabh
回答1:
I found it. I was checking the value and if everything if fine it will return null from the web service. and that null value I was trying to convert to string value and hence geting the above error.
Thanks CommonsWare.
来源:https://stackoverflow.com/questions/17569789/source-attachment-does-not-contain-the-source-for-the-file-threadpoolexecutor-cl