NoClassDefFound (ODatabaseReocrd) problem using Java API to connect to remote database (2.0.2)

183 views
Skip to first unread message

John Firman

unread,
Feb 17, 2015, 7:23:59 PM2/17/15
to orient-...@googlegroups.com
I have set up a server running OrientDB 2.0.2 and am trying to connect to it using the Java API. Here is the code:

      OrientGraphFactory ogf = new OrientGraphFactory("remote:xxx.xxx.xxx.xxx:2424/mygraphdb", "admin", "admin");

      OrientGraph graph = ogf.getTx();

Here is the stack trace of the error that is thrown:

java.lang.NoClassDefFoundError: com/orientechnologies/orient/core/db/record/ODatabaseRecord

 at com.tinkerpop.blueprints.impls.orient.OrientGraphFactory.getTx(OrientGraphFactory.java:71)

 at com.qualpay.gdb.GraphConnector.main(GraphConnector.java:295)

Caused by: java.lang.ClassNotFoundException: com.orientechnologies.orient.core.db.record.ODatabaseRecord

 at java.net.URLClassLoader$1.run(URLClassLoader.java:366)

 at java.net.URLClassLoader$1.run(URLClassLoader.java:355)

 at java.security.AccessController.doPrivileged(Native Method)

 at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

 at java.lang.ClassLoader.loadClass(ClassLoader.java:425)

 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)

 at java.lang.ClassLoader.loadClass(ClassLoader.java:358)


 ... 2 more



Research indicates that ODatabaseRecord was discarded in a previous commit to the code base and I've made absolutely sure that I'm using the most updated .jars in my classpath. Any assistance with what I am doing wrong, or if there is a bug here would be greatly appreciated.

-John

John Firman

unread,
Feb 19, 2015, 12:58:30 PM2/19/15
to orient-...@googlegroups.com
I found the problem - I had included the dependencies for com.tinkerpop.blueprints in my pom.xml (blueprints-core and blueprints-orient-graph). These are not necessary with the latest version of OrientDB. Removing those dependencies solved my problem and I am able to connect to the remote database now.

-John

Reply all
Reply to author
Forward
0 new messages