0

I have built an app EverestNewsApp RSS Feed in order to display current news headlines in a list view and I got following error after running this App

08-06 23:38:56.065: E/AndroidRuntime(15799): FATAL EXCEPTION: AsyncTask #1
08-06 23:38:56.065: E/AndroidRuntime(15799): java.lang.RuntimeException: An error occured while executing doInBackground()
08-06 23:38:56.065: E/AndroidRuntime(15799):    at android.os.AsyncTask$3.done(AsyncTask.java:299)
08-06 23:38:56.065: E/AndroidRuntime(15799):    at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
08-06 23:38:56.065: E/AndroidRuntime(15799):    at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
08-06 23:38:56.065: E/AndroidRuntime(15799):    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
08-06 23:38:56.065: E/AndroidRuntime(15799):    at java.util.concurrent.FutureTask.run(FutureTask.java:137)
08-06 23:38:56.065: E/AndroidRuntime(15799):    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
08-06 23:38:56.065: E/AndroidRuntime(15799):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
08-06 23:38:56.065: E/AndroidRuntime(15799):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
08-06 23:38:56.065: E/AndroidRuntime(15799):    at java.lang.Thread.run(Thread.java:856)
08-06 23:38:56.065: E/AndroidRuntime(15799):    Caused by: java.lang.NoClassDefFoundError: org.jsoup.Jsoup
08-06 23:38:56.065: E/AndroidRuntime(15799):    at com.wfwf.everestnewsapp.parser.DOMParser.parseXml(DOMParser.java:72)
08-06 23:38:56.065: E/AndroidRuntime(15799):    at com.wfwf.everestnewsapp.Splash$AsyncLoadXMLFeed.doInBackground(Splash.java:129)
08-06 23:38:56.065: E/AndroidRuntime(15799):    at com.wfwf.everestnewsapp.Splash$AsyncLoadXMLFeed.doInBackground(Splash.java:1)
08-06 23:38:56.065: E/AndroidRuntime(15799):    at android.os.AsyncTask$2.call(AsyncTask.java:287)
08-06 23:38:56.065: E/AndroidRuntime(15799):    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
08-06 23:38:56.065: E/AndroidRuntime(15799):    ... 5 more

I will be much more pleased to see your great help and guidelines Thank you in advance

Robin V.
  • 1,484
  • 18
  • 30
Ishwor Khanal
  • 1,312
  • 18
  • 30

1 Answers1

0

The general guideline as to stacktraces is: READ THEM.

It is long and intimidating, but you don't have to understand each line. Most of them are just layers of method calls, some of the methods are written by you, some belong to the framework. It is perfectly all right if you can't recognize most of them. What you should do is just skim them, looking for:

  1. lines that come from your code,
  2. lines that have a "caused by..." clause on the beginning, especially the last one (because it is the root of all the problems).

You do not show your full stacktrace and we have to little data to help. But you can clearly see a java.lang.NoClassDefFoundError: org.jsoup.Jsoup. Which means that:

  1. either there is a library missing from your application (how do you build it? are you sure it got added to the apk?),
  2. or the class could not be loaded because of some other exceptions (look at the last one, it's usually the best clue).

WHEN you check it and still don't understand what has happened, it's probably best to ask another question, not change this one (because, for one, my answer will be out of place).

fdreger
  • 12,264
  • 1
  • 36
  • 42
  • Ya I found the same problem of having org.jsoup.Jsoup Note: This element neither has attached source nor attached Javadoc and hence no Javadoc could be found. How to fix this problem?????? – Ishwor Khanal Aug 06 '13 at 15:33
  • @James: you don't need neither source nor javadocs, so this is not a problem. And no, adding question marks does not improve your question. – fdreger Aug 06 '13 at 17:35