Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

  1. ,
    via Stack Overflow by KristianMedK

    You have an empty cursor. Check your query if it is not expected, or handle empty cursor with if(cursor.getCount() > 0) ...

  2. ,
    via Stack Overflow by Rejinderi

    When you get a Cursor returned from the database you should do an moveToFirst(); before trying to get data from it.

Solutions on the web

via Stack Overflow by Payal Garg
, 1 year ago
via blogspot.com by Unknown author, 2 years ago
via GitHub by aperomsik
, 1 year ago
Index 4 requested, with a size of 4
via Stack Overflow by D. Ace
, 2 years ago
via Stack Overflow by user3994005
, 2 years ago
android.database.CursorIndexOutOfBoundsException: Index 3 requested, with a size of 3	at android.database.AbstractCursor.checkPosition(AbstractCursor.java:426)	at android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java:147)	at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:61)	at android.database.CursorWrapper.getString(CursorWrapper.java:114)	at com.phase3.mascotnew.SelectRecipeActivity$MyCursorAdapter.getView(SelectRecipeActivity.java:145)	at android.widget.AbsListView.obtainView(AbsListView.java:2338)	at android.widget.ListView.makeAndAddView(ListView.java:1813)	at android.widget.ListView.fillDown(ListView.java:698)	at android.widget.ListView.fillFromTop(ListView.java:759)	at android.widget.ListView.layoutChildren(ListView.java:1646)	at android.widget.AbsListView.onLayout(AbsListView.java:2149)	at android.view.View.layout(View.java:15140)	at android.view.ViewGroup.layout(ViewGroup.java:4867)	at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1160)	at android.view.View.layout(View.java:15140)	at android.view.ViewGroup.layout(ViewGroup.java:4867)	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:515)	at android.widget.FrameLayout.onLayout(FrameLayout.java:450)	at android.view.View.layout(View.java:15140)	at android.view.ViewGroup.layout(ViewGroup.java:4867)	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1888)	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1742)	at android.widget.LinearLayout.onLayout(LinearLayout.java:1651)	at android.view.View.layout(View.java:15140)	at android.view.ViewGroup.layout(ViewGroup.java:4867)	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:515)	at android.widget.FrameLayout.onLayout(FrameLayout.java:450)	at android.view.View.layout(View.java:15140)	at android.view.ViewGroup.layout(ViewGroup.java:4867)	at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2474)	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2180)	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1246)	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6412)	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:788)	at android.view.Choreographer.doCallbacks(Choreographer.java:591)	at android.view.Choreographer.doFrame(Choreographer.java:560)	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:774)	at android.os.Handler.handleCallback(Handler.java:808)	at android.os.Handler.dispatchMessage(Handler.java:103)	at android.os.Looper.loop(Looper.java:193)	at android.app.ActivityThread.main(ActivityThread.java:5299)	at java.lang.reflect.Method.invokeNative(Native Method)	at java.lang.reflect.Method.invoke(Method.java:515)	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:829)	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:645)	at dalvik.system.NativeStart.main(Native Method)