dbenv.set_errpfx("HOP: ");
dbenv.set_errpfx("Sleepycat");
    public DbWrapper (String dbHome, String dbFilename, boolean useTx) throws DbException {	try {	    this.dbHome = dbHome;	    dbBaseDir = new File (dbHome);	    if (!dbBaseDir.exists())	        dbBaseDir.mkdirs();	    useTransactions = useTx;	    int dbInitFlags = Db.DB_CREATE | Db.DB_THREAD | Db.DB_INIT_MPOOL;	    if (useTransactions) {	        dbInitFlags = dbInitFlags | Db.DB_INIT_TXN;	    }	    dbenv = new DbEnv (0);	    try {	        dbenv.open (dbHome, dbInitFlags, 0); // for berkeley 3.0, add second parameter (null)	    } catch (FileNotFoundException fnf) {	        // we just created the dirs, so this shouldn't happen	    }	    try {	        dbenv.set_error_stream(System.err);	        dbenv.set_errpfx("HOP: ");	    } catch (Exception e) {	        System.err.println("Error in DbWrapper: "+e.toString());	    }	    db = new Db (dbenv, 0);	    try {	        db.upgrade  (dbFilename, 0);	    } catch (Exception ignore) {	        // nothing to upgrade, db doesn't exist	    }	    try {	        db.open (dbFilename, null, Db.DB_BTREE, Db.DB_CREATE, 0644);	    } catch (FileNotFoundException fnf) {	        // we just created the dirs, so this shouldn't happen	    }	    loaded = true;	} catch (NoClassDefFoundError noclass) {	    Server.getLogger().log ("Warning: Using internal file based db as fallback.");	    Server.getLogger().log ("Reason: "+noclass);	    loaded = false;	} catch (UnsatisfiedLinkError nolib) {	    Server.getLogger().log ("Warning: Using internal file based db as fallback.");	    Server.getLogger().log ("Reason: "+nolib);	    loaded = false;	}	    }