Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compilation or install issue #11

Open
vladp opened this issue Jul 14, 2014 · 1 comment
Open

compilation or install issue #11

vladp opened this issue Jul 14, 2014 · 1 comment

Comments

@vladp
Copy link

vladp commented Jul 14, 2014

do I need to compile and separately install lmdb shared library to the a test program working ?

If not, what I am doing wrong (created a simple test program called locrefdcache and setup a project using Maven with the dependency specified in README.md)

There are no install/deployment instructions, so I am improvising (and being new to java).

Thx in advance for any help

$ mvn exec:java
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building locrefdcache 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.3.1:java (default-cli) @ locrefdcache ---
[WARNING] Warning: killAfter is now deprecated. Do you need it ? Please comment on MEXEC-6.
VSP.... STARTING...
[WARNING]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.fusesource.lmdbjni.LMDBException: No such file or directory
at org.fusesource.lmdbjni.Util.checkErrorCode(Util.java:48)
at org.fusesource.lmdbjni.Env.open(Env.java:59)
at org.fusesource.lmdbjni.Env.open(Env.java:51)
at org.fusesource.lmdbjni.Env.open(Env.java:47)
at com.db.locrefdcache.App.main(App.java:19)
... 6 more
[INFO] -----------------------------------------------------------------------
....


My whole maven pom.xml file just as reference is below


4.0.0
com.ydby.locrefdcache
locrefdcache
jar
1.0-SNAPSHOT
locrefdcache
http://maven.apache.org

org.apache.maven.plugins maven-compiler-plugin 2.5.1 1.7 1.7
  <plugin>
  <!-- Build an executable JAR -->
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-jar-plugin</artifactId>
  <version>2.4</version>
  <configuration>
    <archive>
      <manifest>
        <addClasspath>true</addClasspath>
        <classpathPrefix>lib/</classpathPrefix>
        <mainClass>com.ydby.locrefdcache.App</mainClass>
      </manifest>
    </archive>
  </configuration>
</plugin>
org.codehaus.mojo exec-maven-plugin 1.3.1 com.ydby.locrefdcache.App
</plugins>
junit junit 3.8.1 test org.fusesource.lmdbjni lmdbjni-all 99-master-SNAPSHOT fusesource.nexus.snapshot FuseSource Community Snapshot Repository http://repo.fusesource.com/nexus/content/groups/public-snapshots
@vladp
Copy link
Author

vladp commented Jul 14, 2014

ok. problem was that my test program had env_open("/tmp/testdb" ...). and I thought it would create a new file caleld testdb. Instead it was looking for a directory named /tmp/testdb.

Other than that my setup worked. I did not need to separately build and install lmdb binary.
I need to publish the project and test program somewhere, to save folks who are not proficient in Java/maven/etc, some time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant