GeezerVison is showing github.com — org.lmdbjava.LmdbNativeException$ConstantDerviedException: Platform constant error code: ENOENT (2) · Issue #62 · lmdbjava/lmdbjava
org.lmdbjava.LmdbNativeException$ConstantDerviedException: Platform constant error code: ENOENT (2) #62
Description
I have the following code:
public boolean init(Properties prop) {
boolean fail = false;
String csEnvironmentStr = prop.getProperty("csEnvironment");
env = create()
// LMDB also needs to know how large our DB might be. Over-estimating is OK.
.setMapSize(53687091200l)
// LMDB also needs to know how many DBs (Dbi) we want to store in this Env.
.setMaxDbs(4)
// Now let's open the Env. The same path can be concurrently opened and
// used in different processes, but do not open the same path twice in
// the same process at the same time.
.open(new File(csEnvironmentStr+"/csdb"));
...
I get this exception, the last line above is line 91 indicated below:
org.lmdbjava.LmdbNativeException$ConstantDerviedException: Platform constant error code: ENOENT (2)
at org.lmdbjava.ResultCodeMapper.checkRc(ResultCodeMapper.java:113)
at org.lmdbjava.Env$Builder.open(Env.java:458)
at org.lmdbjava.Env$Builder.open(Env.java:474)
at uk.co.example.LmDbStore.init(LmDbStore.java:91)
As you can see this code is lifted from the Tutorial example. The path specified does exist. Ideas?
Activity
davidwynter commented on Aug 14, 2017
Ha, my bad, typo in directory name. Traced into lmdbjava to get a view of what was actually happening. checkRc is very revealing. Be useful to add these error messages to the docs rather than a cryptic ENOENT message
bp-alex commented on Aug 15, 2017
Be useful to add these error messages to the docs rather than a cryptic ENOENT message
Good idea. I opened issue #63 and this has now been done.
Metadata
Metadata
Development
No branches or pull requestsIssue actions