Ragasudha
Ragasudha

Reputation: 31

com.sleepycat.db.DatabaseException: Permission denied Exception while creating DB Env

Below is the piece of code to create instance for XMLManager,

    EnvironmentConfig config = new EnvironmentConfig();
    config.setErrorStream(System.err);
    config.setAllowCreate(true);
    config.setRunRecovery(true);
    config.setTransactional(true);
    config.setInitializeLocking(true);
    config.setInitializeLogging(true);
    config.setInitializeCache(true);
    config.setLogAutoRemove(true);
    config.setCacheSize(25 * 1024 * 1024); // 25MB cache
    dbEnv =  new Environment(<db-env-home>, config);

    XmlManagerConfig xmlMgrCfg = new XmlManagerConfig();
    xmlMgrCfg.setAdoptEnvironment(true); 

    XmlManager  _xmlMgr =  new XmlManager(dbEnv , xmlMgrCfg);

While running this code I got the following exception,

com.sleepycat.db.DatabaseException: Permission denied: __db.001: Permission denied: Permission denied at com.sleepycat.db.internal.db_javaJNI.DbEnv_open(Native Method) at com.sleepycat.db.internal.DbEnv.open(DbEnv.java:317) at com.sleepycat.db.EnvironmentConfig.openEnvironment(EnvironmentConfig.java:3886) at com.sleepycat.db.Environment.(Environment.java:93)

Upvotes: 0

Views: 114

Answers (1)

lrv-eps
lrv-eps

Reputation: 136

Are you able to confirm the user the application runs under has write access to the <db-env-home> path?

Upvotes: 1

Related Questions