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 8873353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:26:39+00:00 2026-06-14T18:26:39+00:00

Below I am posting the logcat details. Please tell me How to resolve that.

  • 0

Below I am posting the logcat details. Please tell me How to resolve that.

11-21 14:49:33.604: E/AndroidRuntime(1721): FATAL EXCEPTION: main
11-21 14:49:33.604: E/AndroidRuntime(1721): java.lang.RuntimeException: Unable to resume activity {com.example.shaktitool/com.example.shaktitool.Product}: java.lang.IllegalStateException: trying to requery an already closed cursor  android.database.sqlite.SQLiteCursor@41334490
11-21 14:49:33.604: E/AndroidRuntime(1721):     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2575)
11-21 14:49:33.604: E/AndroidRuntime(1721):     at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2603)
11-21 14:49:33.604: E/AndroidRuntime(1721):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
11-21 14:49:33.604: E/AndroidRuntime(1721):     at android.os.Handler.dispatchMessage(Handler.java:99)
11-21 14:49:33.604: E/AndroidRuntime(1721):     at android.os.Looper.loop(Looper.java:137)
11-21 14:49:33.604: E/AndroidRuntime(1721):     at android.app.ActivityThread.main(ActivityThread.java:4745)
11-21 14:49:33.604: E/AndroidRuntime(1721):     at java.lang.reflect.Method.invokeNative(Native Method)
11-21 14:49:33.604: E/AndroidRuntime(1721):     at java.lang.reflect.Method.invoke(Method.java:511)
11-21 14:49:33.604: E/AndroidRuntime(1721):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
11-21 14:49:33.604: E/AndroidRuntime(1721):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
11-21 14:49:33.604: E/AndroidRuntime(1721):     at dalvik.system.NativeStart.main(Native Method)
11-21 14:49:33.604: E/AndroidRuntime(1721): Caused by: java.lang.IllegalStateException: trying to requery an already closed cursor  android.database.sqlite.SQLiteCursor@41334490
11-21 14:49:33.604: E/AndroidRuntime(1721):     at android.app.Activity.performRestart(Activity.java:5051)
11-21 14:49:33.604: E/AndroidRuntime(1721):     at android.app.Activity.performResume(Activity.java:5074)
11-21 14:49:33.604: E/AndroidRuntime(1721):     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2565)
11-21 14:49:33.604: E/AndroidRuntime(1721):     ... 10 more

My Java Code:

package com.example.shaktitool;
    import android.app.Activity;
    import android.content.Intent;
    import android.database.Cursor;
    import android.os.Bundle;
    import android.view.KeyEvent;
    import android.view.View;
    import android.widget.AdapterView;
    import android.widget.AdapterView.OnItemClickListener;
    import android.widget.ListView;
    import android.widget.SimpleCursorAdapter;



    public class Product extends Activity {

    protected static final String PRODUCT_REQUEST = null;

    private SQLiteAdapterPro mySQLiteAdapter;

        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.product);

            Intent intent = getIntent();

            ListView list = (ListView)findViewById(R.id.content_list);


            /*
             *  Create/Open a SQLite database
             *  and fill with dummy content
             *  and close it
             */
            mySQLiteAdapter = new SQLiteAdapterPro(this);
            mySQLiteAdapter.openToWrite();
            mySQLiteAdapter.deleteAll();

            mySQLiteAdapter.insert("ELECTRONICS-COMPUTERS");
            mySQLiteAdapter.insert("DESKTOPS");
            mySQLiteAdapter.insert("NOTEBOOKS");

            mySQLiteAdapter.close();

            /*
             *  Open the same SQLite database
             *  and read all it's content.
             */
            mySQLiteAdapter = new SQLiteAdapterPro(this);
            mySQLiteAdapter.openToRead();

            Cursor cursor = mySQLiteAdapter.queueAll();
            startManagingCursor(cursor);

            String[] from = new String[]{SQLiteAdapter.KEY_CONTENT};
            int[] to = new int[]{R.id.text};

            SimpleCursorAdapter cursorAdapter =
                new SimpleCursorAdapter(this, R.layout.row, cursor, from, to);

            list.setAdapter(cursorAdapter);

            list.setOnItemClickListener( new OnItemClickListener() {

                public void onItemClick(AdapterView<?> arg0, View arg1,
                        int position, long arg3) {

                    switch(position){

                    case 1 : Intent intent = new Intent(Product.this, Desktop.class);
                             startActivity(intent);

                             break;

                    case 2 : Intent intent1 = new Intent(Product.this, Notebook.class);
                             startActivity(intent1);

                             break;                        


                    }
                }   
            });


            mySQLiteAdapter.close();



        }
    }
  • 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-14T18:26:40+00:00Added an answer on June 14, 2026 at 6:26 pm

    First: your should read the FAQ of StackOverflow.

    Second: by reading your logcat I understand that:

    java.lang.RuntimeException: Unable to resume activity {com.example.shaktitool/com.example.shaktitool.Product}: java.lang.IllegalStateException: trying to requery an already closed cursor  android.database.sqlite.SQLiteCursor@41334490
    
    Caused by: java.lang.IllegalStateException: trying to requery an already closed cursor  android.database.sqlite.SQLiteCursor@41334490
    

    So: trying to requery an already closed cursor means that you do something wrong with SQLite. Post your java code and you’ll get help.

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

Sidebar

Related Questions

I am getting java.lang.VerifyError.I am posting my log-file and code below. I have looked
Below I am posting some code that I am using to try to set
Can anybody help me resolve the problem for posting multipart/form-data using below code. I
Below am posting my jsp page. home.jsp <%@taglib uri=/WEB-INF/struts-bean.tld prefix=bean%> <%@taglib uri=/WEB-INF/struts-html.tld prefix=html %>
I've got the below JavaScript posting data when it is able to determine as
Just posting the solution I worked out today. See my answer below. If you
Below is code to an inherited ComboBox. The issue is that the ComboBox is
Below is my main activity file. I am stuck with the bottom area (commented
I'm starting out in python.. The details I have written in the below.. It
So, I am posting my code below. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath //

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.