java.lang.RuntimeException: An error occured while executing doInBackground() Android RSS Reader

StackOverflow https://stackoverflow.com/questions/17189011

  •  01-06-2022
  •  | 
  •  

Question

I've downloaded http://techiedreams.com/android-rss-reader-part-3-action-bar-with-animated-item/ to play with creating a custom RSS reader for a while, but recently it started acting up, at first I thought it was my own fault but then I redownloaded the first three versions (Which worked perfectly for the 5 weeks I used them by the way) it was great and I was just customizing it a bit to get some experience in Java & Android programming

However I've been stuck in a hole where I have no idea what to do on how to fix this problem.

This is the log of my LogCat of the activity (This is just the error that I would get from downloading the RSS reader which I linked a bit up) where it should load the RSS feed and initialize the ListActivity.

06-19 12:20:06.750: D/dalvikvm(30977): GC_FOR_ALLOC freed 67K, 7% free 12338K/13127K, paused 25ms, total 26ms
06-19 12:20:06.750: I/dalvikvm-heap(30977): Grow heap (frag case) to 12.935MB for 337616-byte allocation
06-19 12:20:06.760: D/dalvikvm(30977): GC_FOR_ALLOC freed <1K, 7% free 12666K/13511K, paused 9ms, total 9ms
06-19 12:20:06.905: I/dalvikvm(30977): Could not find method org.jsoup.Jsoup.parse, referenced from method com.td.rssreader.parser.DOMParser.parseXml
06-19 12:20:06.915: D/libEGL(30977): loaded /system/lib/egl/libEGL_mali.so
06-19 12:20:06.925: D/libEGL(30977): loaded /system/lib/egl/libGLESv1_CM_mali.so
06-19 12:20:06.925: D/libEGL(30977): loaded /system/lib/egl/libGLESv2_mali.so
06-19 12:20:06.930: D/(30977): Device driver API match
06-19 12:20:06.930: D/(30977): Device driver API version: 10
06-19 12:20:06.930: D/(30977): User space API version: 10 
06-19 12:20:06.935: D/(30977): mali: REVISION=Linux-r2p4-02rel0 BUILD_DATE=Tue Oct 16 15:37:13 KST 2012 
06-19 12:20:06.975: D/OpenGLRenderer(30977): Enabling debug mode 0
06-19 12:20:07.005: W/dalvikvm(30977): VFY: unable to resolve static method 267: Lorg/jsoup/Jsoup;.parse (Ljava/lang/String;)Lorg/jsoup/nodes/Document;
06-19 12:20:07.005: D/dalvikvm(30977): VFY: replacing opcode 0x71 at 0x00b6
06-19 12:20:10.485: D/dalvikvm(31065): GC_FOR_ALLOC freed 70K, 7% free 12338K/13127K, paused 16ms, total 16ms
06-19 12:20:10.490: I/dalvikvm-heap(31065): Grow heap (frag case) to 12.935MB for 337616-byte allocation
06-19 12:20:10.520: D/dalvikvm(31065): GC_FOR_ALLOC freed <1K, 7% free 12666K/13511K, paused 12ms, total 12ms
06-19 12:20:10.555: I/dalvikvm(31065): Could not find method org.jsoup.Jsoup.parse, referenced from method com.td.rssreader.parser.DOMParser.parseXml
06-19 12:20:10.555: W/dalvikvm(31065): VFY: unable to resolve static method 267: Lorg/jsoup/Jsoup;.parse (Ljava/lang/String;)Lorg/jsoup/nodes/Document;
06-19 12:20:10.555: D/dalvikvm(31065): VFY: replacing opcode 0x71 at 0x00b6
06-19 12:20:10.610: D/libEGL(31065): loaded /system/lib/egl/libEGL_mali.so
06-19 12:20:10.620: D/libEGL(31065): loaded /system/lib/egl/libGLESv1_CM_mali.so
06-19 12:20:10.625: D/libEGL(31065): loaded /system/lib/egl/libGLESv2_mali.so
06-19 12:20:10.625: D/(31065): Device driver API match
06-19 12:20:10.625: D/(31065): Device driver API version: 10
06-19 12:20:10.625: D/(31065): User space API version: 10 
06-19 12:20:10.625: D/(31065): mali: REVISION=Linux-r2p4-02rel0 BUILD_DATE=Tue Oct 16 15:37:13 KST 2012 
06-19 12:20:10.670: D/OpenGLRenderer(31065): Enabling debug mode 0
06-19 12:20:11.255: D/dalvikvm(31065): GC_CONCURRENT freed 387K, 8% free 12736K/13703K, paused 4ms+11ms, total 32ms
06-19 12:20:11.360: D/dalvikvm(31065): GC_CONCURRENT freed 261K, 7% free 12876K/13767K, paused 11ms+11ms, total 34ms
06-19 12:20:11.425: D/dalvikvm(31065): GC_CONCURRENT freed 371K, 7% free 13071K/14023K, paused 11ms+1ms, total 23ms
06-19 12:20:11.425: D/dalvikvm(31065): WAIT_FOR_CONCURRENT_GC blocked 4ms
06-19 12:20:11.500: D/dalvikvm(31065): GC_CONCURRENT freed 376K, 7% free 13245K/14215K, paused 11ms+11ms, total 36ms
06-19 12:20:11.560: D/dalvikvm(31065): GC_CONCURRENT freed 361K, 7% free 13382K/14343K, paused 12ms+2ms, total 26ms
06-19 12:20:11.615: D/dalvikvm(31065): GC_CONCURRENT freed 361K, 7% free 13590K/14535K, paused 2ms+2ms, total 17ms
06-19 12:20:11.615: D/dalvikvm(31065): WAIT_FOR_CONCURRENT_GC blocked 5ms
06-19 12:20:11.645: D/dalvikvm(31065): GC_FOR_ALLOC freed 274K, 7% free 13646K/14663K, paused 11ms, total 11ms
06-19 12:20:11.660: D/dalvikvm(31065): GC_FOR_ALLOC freed 116K, 8% free 13723K/14791K, paused 11ms, total 11ms
06-19 12:20:11.690: D/dalvikvm(31065): GC_CONCURRENT freed 412K, 7% free 13859K/14855K, paused 1ms+1ms, total 13ms
06-19 12:20:11.690: D/dalvikvm(31065): WAIT_FOR_CONCURRENT_GC blocked 5ms
06-19 12:20:11.740: D/dalvikvm(31065): GC_CONCURRENT freed 452K, 7% free 14011K/15047K, paused 12ms+2ms, total 25ms
06-19 12:20:11.740: D/dalvikvm(31065): WAIT_FOR_CONCURRENT_GC blocked 4ms
06-19 12:20:11.770: W/dalvikvm(31065): threadid=11: thread exiting with uncaught exception (group=0x40fc92a0)
06-19 12:20:11.775: E/AndroidRuntime(31065): FATAL EXCEPTION: AsyncTask #1
06-19 12:20:11.775: E/AndroidRuntime(31065): java.lang.RuntimeException: An error occured while executing doInBackground()
06-19 12:20:11.775: E/AndroidRuntime(31065):    at android.os.AsyncTask$3.done(AsyncTask.java:299)
06-19 12:20:11.775: E/AndroidRuntime(31065):    at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
06-19 12:20:11.775: E/AndroidRuntime(31065):    at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
06-19 12:20:11.775: E/AndroidRuntime(31065):    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
06-19 12:20:11.775: E/AndroidRuntime(31065):    at java.util.concurrent.FutureTask.run(FutureTask.java:137)
06-19 12:20:11.775: E/AndroidRuntime(31065):    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
06-19 12:20:11.775: E/AndroidRuntime(31065):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
06-19 12:20:11.775: E/AndroidRuntime(31065):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
06-19 12:20:11.775: E/AndroidRuntime(31065):    at java.lang.Thread.run(Thread.java:856)
06-19 12:20:11.775: E/AndroidRuntime(31065): Caused by: java.lang.NoClassDefFoundError: org.jsoup.Jsoup
06-19 12:20:11.775: E/AndroidRuntime(31065):    at com.td.rssreader.parser.DOMParser.parseXml(DOMParser.java:71)
06-19 12:20:11.775: E/AndroidRuntime(31065):    at com.td.rssreader.SplashActivity$AsyncLoadXMLFeed.doInBackground(SplashActivity.java:104)
06-19 12:20:11.775: E/AndroidRuntime(31065):    at com.td.rssreader.SplashActivity$AsyncLoadXMLFeed.doInBackground(SplashActivity.java:1)
06-19 12:20:11.775: E/AndroidRuntime(31065):    at android.os.AsyncTask$2.call(AsyncTask.java:287)
06-19 12:20:11.775: E/AndroidRuntime(31065):    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
06-19 12:20:11.775: E/AndroidRuntime(31065):    ... 5 more

If neccecary I can post the code here, but it's also downloadable http://techiedreams.com/android-rss-reader-part-3-action-bar-with-animated-item/ here.

Take note that this all used to work for a long period of time and only yesterday it started acting up like this.

Can anyone please tell me what is going on. .

Was it helpful?

Solution

If you browse your log carefully you will notice the root cause.

Caused by: java.lang.NoClassDefFoundError: org.jsoup.Jsoup

This tells you right away that jsoup library is not found in the android. I have encountered similar problem in the past where android was not able to find the libraries. I have followed these steps to rectify the issue.

  1. In eclipse open "Configure Build Paths"
  2. Goto Order and Export Tab
  3. Check the library that is in question.

This should do the trick.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top