Retriving of data causing trouble in android sqlite
<p>I am trying to retive data from database. Its showing error for display1.setOnClickListener(this);. Please anyone suggest me.</p>

<pre><code>@Override

protected void onCreate(Bundle savedInstanceState) {

    // TODO Auto-generated method stub

    super.onCreate(savedInstanceState);

    display1=(Button)findViewById(R.id.button1);

    inputid=(EditText)findViewById(R.id.display);

    display1.setOnClickListener(this);
}

public void onClick(View v) {

    // TODO Auto-generated method stub

    int id=Integer.parseInt(inputid.getText().toString());

    DBAdapter dbadapter=new DBAdapter(this);

    Cursor c=dbadapter.display(id);

    Toast.makeText(this, "Name: " + c.getString(1) , Toast.LENGTH_LONG).show();

}
</code></pre>

<p>LOGCAT is</p>

<p>12-26 16:27:26.438: D/AndroidRuntime(31283): Shutting down VM
12-26 16:27:26.438: W/dalvikvm(31283): threadid=1: thread exiting with uncaught exception (group=0x40015560)
12-26 16:27:26.448: E/AndroidRuntime(31283): FATAL EXCEPTION: main
12-26 16:27:26.448: E/AndroidRuntime(31283): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.database/com.android.database.Display}: java.lang.NullPointerException
12-26 16:27:26.448: E/AndroidRuntime(31283):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
12-26 16:27:26.448: E/AndroidRuntime(31283):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
12-26 16:27:26.448: E/AndroidRuntime(31283):    at android.app.ActivityThread.access$1500(ActivityThread.java:117)
12-26 16:27:26.448: E/AndroidRuntime(31283):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
12-26 16:27:26.448: E/AndroidRuntime(31283):    at android.os.Handler.dispatchMessage(Handler.java:99)
12-26 16:27:26.448: E/AndroidRuntime(31283):    at android.os.Looper.loop(Looper.java:123)
12-26 16:27:26.448: E/AndroidRuntime(31283):    at android.app.ActivityThread.main(ActivityThread.java:3683)
12-26 16:27:26.448: E/AndroidRuntime(31283):    at java.lang.reflect.Method.invokeNative(Native Method)
12-26 16:27:26.448: E/AndroidRuntime(31283):    at java.lang.reflect.Method.invoke(Method.java:507)
12-26 16:27:26.448: E/AndroidRuntime(31283):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
12-26 16:27:26.448: E/AndroidRuntime(31283):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
12-26 16:27:26.448: E/AndroidRuntime(31283):    at dalvik.system.NativeStart.main(Native Method)
12-26 16:27:26.448: E/AndroidRuntime(31283): Caused by: java.lang.NullPointerException
<strong>12-26 16:27:26.448: E/AndroidRuntime(31283):  at com.android.database.Display.onCreate(Display.java:23)*</strong><em>error here</em>*
12-26 16:27:26.448: E/AndroidRuntime(31283):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
12-26 16:27:26.448: E/AndroidRuntime(31283):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
12-26 16:27:26.448: E/AndroidRuntime(31283):    ... 11 more
12-26 16:27:28.448: I/Process(31283): Sending signal. PID: 31283 SIG: 9</p>
