Android sqlite exception. Unable to instantiate activity
===

When I run an activity in my Android app with instantiating dbs classes as follows: 

	private final DbOpenHelper dbOpen = new DbOpenHelper(MainMonitor.this);
	private final SQLiteDatabase db = dbOpen.getWritableDatabase();
	private final ContentValues cv = new ContentValues();	

 it falls with exception: 

        07-10 15:33:31.581: E/AndroidRuntime(1142): FATAL EXCEPTION: main
    07-10 15:33:31.581: E/AndroidRuntime(1142): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.android.analizer/com.android.analyzer.MainMonitor}: java.lang.NullPointerException
    07-10 15:33:31.581: E/AndroidRuntime(1142): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1879)
    07-10 15:33:31.581: E/AndroidRuntime(1142): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1980)
    07-10 15:33:31.581: E/AndroidRuntime(1142): 	at android.app.ActivityThread.access$600(ActivityThread.java:122)
    07-10 15:33:31.581: E/AndroidRuntime(1142): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1146)
    07-10 15:33:31.581: E/AndroidRuntime(1142): 	at android.os.Handler.dispatchMessage(Handler.java:99)
    07-10 15:33:31.581: E/AndroidRuntime(1142): 	at android.os.Looper.loop(Looper.java:137)
    07-10 15:33:31.581: E/AndroidRuntime(1142): 	at android.app.ActivityThread.main(ActivityThread.java:4340)
    07-10 15:33:31.581: E/AndroidRuntime(1142): 	at java.lang.reflect.Method.invokeNative(Native Method)
    07-10 15:33:31.581: E/AndroidRuntime(1142): 	at java.lang.reflect.Method.invoke(Method.java:511)
    07-10 15:33:31.581: E/AndroidRuntime(1142): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
    07-10 15:33:31.581: E/AndroidRuntime(1142): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
    07-10 15:33:31.581: E/AndroidRuntime(1142): 	at dalvik.system.NativeStart.main(Native Method)
    07-10 15:33:31.581: E/AndroidRuntime(1142): Caused by: java.lang.NullPointerException
    07-10 15:33:31.581: E/AndroidRuntime(1142): 	at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:221)
    07-10 15:33:31.581: E/AndroidRuntime(1142): 	at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:157)
    07-10 15:33:31.581: E/AndroidRuntime(1142): 	at com.android.analyzer.MainMonitor.<init>(MainMonitor.java:40)
    07-10 15:33:31.581: E/AndroidRuntime(1142): 	at java.lang.Class.newInstanceImpl(Native Method)
    07-10 15:33:31.581: E/AndroidRuntime(1142): 	at java.lang.Class.newInstance(Class.java:1319)
    07-10 15:33:31.581: E/AndroidRuntime(1142): 	at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
    07-10 15:33:31.581: E/AndroidRuntime(1142): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1870)
    07-10 15:33:31.581: E/AndroidRuntime(1142): 	... 11 more

DbOpenHelper looks like this: 

        
    import android.content.Context;
    import android.database.sqlite.SQLiteDatabase;
    import android.database.sqlite.SQLiteDatabase.CursorFactory;
    import android.database.sqlite.SQLiteOpenHelper;
    
    public class DbOpenHelper extends SQLiteOpenHelper {
    
    	private static final String DB_NAME = "analyzer";
    	private static final int DB_VERSION = 1;
    	
    	public static final String TABLE_NAME = "network";
    	public static final String ACTIVITY = "activity";
    	
    	public static final String CREATE_TABLE_NETWORK = "CREATE TABLE "+TABLE_NAME+"(" +
    			"_id integer primary key autoincrement, activity integer default 1)"; 
    	
    //	DbOpenHelper openHelper = null;
    	
    	public DbOpenHelper(Context context) {
    		super(context, DB_NAME, null, DB_VERSION);
    //		openHelper = new DbOpenHelper(context);
    		
    	}
    
    	public void onCreate(SQLiteDatabase sqliteDb) {
    		sqliteDb.execSQL(CREATE_TABLE_NETWORK);
    		sqliteDb.execSQL("INSERT INTO network(activity) VALUES(1)");
    	}
    	
    	public void onUpgrade(SQLiteDatabase sqliteDb, int i, int i2) {
    		
    	}
    	
    //	@Override
    //	public void close() {
    //		if (openHelper!=null) openHelper.close();		
    //	}
    	
    }