创建OrientDB数据库时出现意外异常

时间:2015-04-08 14:31:21

标签: java orientdb

我是OrientDB的新手,我正在尝试使用java代码创建数据库。我使用Play框架构建应用程序,但运行代码时会显示以下异常:

OdbConfig coredb = new OdbConfig("coredb"); //coredb.url = "plocal:databases/coredb";
try{
        new ODatabaseDocumentTx(coredb.url).create();
        System.out.print("Database Created");
    }
    catch(Exception e){
        System.out.print("ALREADY CREATED DATABASES");
        System.out.print(e);    
    }

意外异常:

NoClassDefFoundError: Could not initialize class com.orientechnologies.orient.core.db.ODatabaseRecordThreadLocal
No source available, here is the exception stack trace:
->java.lang.NoClassDefFoundError: Could not initialize class com.orientechnologies.orient.core.db.ODatabaseRecordThreadLocal
     com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.setCurrentDatabaseInThreadLocal(ODatabaseDocumentTx.java:2575)
     com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.create(ODatabaseDocumentTx.java:357)
     com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.create(ODatabaseDocumentTx.java:352)
     com.oseep.orient.core.Connection.initConnection(Connection.java:26)
     com.oseep.commons.OPlugin.onStart(OPlugin.java:24)
     play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:91)
     play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:91)
     scala.collection.immutable.List.foreach(List.scala:381)
     play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:91)
     play.api.Play$$anonfun$start$1.apply(Play.scala:91)
     play.api.Play$$anonfun$start$1.apply(Play.scala:91)
     play.utils.Threads$.withContextClassLoader(Threads.scala:21)
     play.api.Play$.start(Play.scala:90)
     play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:157)
     play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:130)
     scala.Option.map(Option.scala:145)
     play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(ApplicationProvider.scala:130)
     play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(ApplicationProvider.scala:128)
     scala.util.Success.flatMap(Try.scala:230)
     play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:128)
     play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:120)
     scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
     scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
     scala.concurrent.forkjoin.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1361)
     scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
     scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
     scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
     scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

0 个答案:

没有答案