what is this error in android?

581 Views Asked by At

what is this error in android ??

04-20 20:49:56.827: ERROR/AndroidRuntime(826): FATAL EXCEPTION: AsyncTask #1
04-20 20:49:56.827: ERROR/AndroidRuntime(826): java.lang.RuntimeException: An error occured while executing doInBackground()
04-20 20:49:56.827: ERROR/AndroidRuntime(826):     at android.os.AsyncTask$3.done(AsyncTask.java:200)
04-20 20:49:56.827: ERROR/AndroidRuntime(826):     at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
04-20 20:49:56.827: ERROR/AndroidRuntime(826):     at java.util.concurrent.FutureTask.setException(FutureTask.java:125)
04-20 20:49:56.827: ERROR/AndroidRuntime(826):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
04-20 20:49:56.827: ERROR/AndroidRuntime(826):     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
04-20 20:49:56.827: ERROR/AndroidRuntime(826):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
04-20 20:49:56.827: ERROR/AndroidRuntime(826):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
04-20 20:49:56.827: ERROR/AndroidRuntime(826):     at java.lang.Thread.run(Thread.java:1019)
04-20 20:49:56.827: ERROR/AndroidRuntime(826): Caused by: java.lang.IllegalArgumentException
04-20 20:49:56.827: ERROR/AndroidRuntime(826):     at java.util.Date.parse(Date.java:436)
04-20 20:49:56.827: ERROR/AndroidRuntime(826):     at java.util.Date.<init>(Date.java:148)
04-20 20:49:56.827: ERROR/AndroidRuntime(826):     at winterwell.jtwitter.Twitter$Status.<init>(Twitter.java:614)
04-20 20:49:56.827: ERROR/AndroidRuntime(826):     at winterwell.jtwitter.Twitter.updateStatus(Twitter.java:3073)
04-20 20:49:56.827: ERROR/AndroidRuntime(826):     at winterwell.jtwitter.Twitter.updateStatus(Twitter.java:3003)
04-20 20:49:56.827: ERROR/AndroidRuntime(826):     at com.marakana.yamba1.StatusActivity$PostToTwitter.doInBackground(StatusActivity.java:60)
04-20 20:49:56.827: ERROR/AndroidRuntime(826):     at com.marakana.yamba1.StatusActivity$PostToTwitter.doInBackground(StatusActivity.java:1)
04-20 20:49:56.827: ERROR/AndroidRuntime(826):     at android.os.AsyncTask$2.call(AsyncTask.java:185)
04-20 20:49:56.827: ERROR/AndroidRuntime(826):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
04-20 20:49:56.827: ERROR/AndroidRuntime(826):     ... 4 more
4

There are 4 best solutions below

0
On BEST ANSWER

This stack trace means that you've passed an illegal date format in Twitter.updateStatus.

These are the important lines:

04-20 20:49:56.827: ERROR/AndroidRuntime(826): Caused by: java.lang.IllegalArgumentException
04-20 20:49:56.827: ERROR/AndroidRuntime(826):     at java.util.Date.parse(Date.java:436)
04-20 20:49:56.827: ERROR/AndroidRuntime(826):     at java.util.Date.<init>(Date.java:148)
04-20 20:49:56.827: ERROR/AndroidRuntime(826):     at winterwell.jtwitter.Twitter$Status.<init>(Twitter.java:614)
04-20 20:49:56.827: ERROR/AndroidRuntime(826):     at winterwell.jtwitter.Twitter.updateStatus(Twitter.java:3073)
04-20 20:49:56.827: ERROR/AndroidRuntime(826):     at winterwell.jtwitter.Twitter.updateStatus(Twitter.java:3003)

If you're not instantiating that object then it could be a bug in the API. Judging by the API docco here: http://www.winterwell.com/software/jtwitter/javadoc/ it looks like you just pass a status message through to Twitter.updateStatus so my guess would be a jtwitter API bug...

0
On

Looks like java.util.Date.parse() is being called with an invalid value?

0
On

I'd like to help, if I can reproduce the exception. Is it regular or intermittent? Which version of JTwitter are you using? And what's the status message & account that you use to cause this?

0
On

Are you connecting to Twitter itself or another Twitter-like service?

There was a bug relating to Marakana's Android JTwitter tutorial- it used a Twitter-like service, which had a different date format.

Anyway: the latest version of JTwitter has fixed things to accept more variations in date formatting. http://www.winterwell.com/software/jtwitter.php