Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8828305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:34:31+00:00 2026-06-14T07:34:31+00:00

I am trying to retrieve specific data like custom ads, username, date etc from

  • 0

I am trying to retrieve specific data like custom ads, username, date etc from database. so followed the code from this Need a simple tutorial for android/webservice work?. I’m going wrong some where can any one help as i am new to android.Getting following errors

11-13 21:57:14.720: E/AndroidRuntime(399): FATAL EXCEPTION: main
11-13 21:57:14.720: E/AndroidRuntime(399): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.response/com.response.FetchList}: java.lang.ClassCastException: com.response.FetchList
11-13 21:57:14.720: E/AndroidRuntime(399):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
11-13 21:57:14.720: E/AndroidRuntime(399):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
11-13 21:57:14.720: E/AndroidRuntime(399):  at android.app.ActivityThread.access$2300(ActivityThread.java:125)
11-13 21:57:14.720: E/AndroidRuntime(399):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
11-13 21:57:14.720: E/AndroidRuntime(399):  at android.os.Handler.dispatchMessage(Handler.java:99)
11-13 21:57:14.720: E/AndroidRuntime(399):  at android.os.Looper.loop(Looper.java:123)
11-13 21:57:14.720: E/AndroidRuntime(399):  at android.app.ActivityThread.main(ActivityThread.java:4627)
11-13 21:57:14.720: E/AndroidRuntime(399):  at java.lang.reflect.Method.invokeNative(Native Method)
11-13 21:57:14.720: E/AndroidRuntime(399):  at java.lang.reflect.Method.invoke(Method.java:521)
11-13 21:57:14.720: E/AndroidRuntime(399):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
11-13 21:57:14.720: E/AndroidRuntime(399):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
11-13 21:57:14.720: E/AndroidRuntime(399):  at dalvik.system.NativeStart.main(Native Method)
11-13 21:57:14.720: E/AndroidRuntime(399): Caused by: java.lang.ClassCastException: com.response.FetchList
11-13 21:57:14.720: E/AndroidRuntime(399):  at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
11-13 21:57:14.720: E/AndroidRuntime(399):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)

Edit-
Manifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.response"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.INTERNET"/>

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".Response"
        android:label="@string/title_activity_response" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".MainActivity"
        android:label="@string/title_activity_main" >
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="android.support.v4.app.FragmentActivity" />
    </activity>
    <activity
        android:name=".XMLParser"
        android:label="@string/title_activity_response" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".FetchList"
        android:label="@string/title_activity_response" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T07:34:32+00:00Added an answer on June 14, 2026 at 7:34 am

    If you’ve taken the code from that link exactly as-is, then you could be running into that error at the line,

    public class FetchList extends asyncTask<Void,Void,Byte>{
    
                    doinbackground{
    

    Which would actually be

        public class FetchList extends asyncTask<Void, Void, Byte> {
            @Override
            protected Byte doInBackground (Void... voids){
              ...
            }
        }
    

    EDIT: From the code in your comment,

    public class FetchList extends AsyncTask<Void,Void,Byte>{
      @Override
      protected Byte doInBackground1(Void... arg0){
            // this was explained in first step
            Response res = new Response("url");
            String response = res.getResponse();
            XMLParser xml = new XMLParser(response);
            ArrayList<XMLParser> itemList = xml.getItemList();
            return xml.parse();
      }
    }
    

    In this case let me know what the Logcat output is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to retrieve specific data from my MySQL database by passing the
Iam trying to retrieve data from mysql database into stylesheet.php but it is not
i'm trying to auto retrieve data from mysql server in specific DIV without manual
I am trying retrieve user name from the code through graph api, the below
Hi I am trying to retrieve values from database. I have a row which
I'm trying to retrieve a stored date in a MS Access 2003 database ..
I have some code to retrieve XML data: import cStringIO import pycurl from xml.etree
I am trying to retrieve some specific data, using jQuery to retrieve a JSON
I'm trying to retrieve note titles from a specific notebook whenever the user clicks
Below I'm trying to retrieve a specific category record in my data store for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.