OrientDB java api SQL命令CREATE EDGE

时间:2016-06-17 13:04:09

标签: eclipse orientdb orientdb-2.1

我使用Java API在orientDB(2.1.15)上遇到了一些麻烦。 我已将以下jar添加到我的项目库中:

blueprints-core-2.6.0.jar
concurrentlinkedhashmap-lru-1.4.1.jar
jna-4.0.0.jar
na-platform-4.0.0.jar
orientdb-client-2.1.15.jar
orientdb-core-2.1.15.jar
orientdb-enterprise-2.1.15.jar
orientdb-graphdb-2.1.15.jar
pipes-2.6.0.jar

我想执行以下命令:

CREATE EDGE MetaInf2kmer FROM (select from MetaInfNode where accNo ='X17276.1') TO (select from GenomeGraphNode where seq=141) SET taxid=9646

通过:

db.command(new OCommandSQL("CREATE EDGE MetaInf2kmer FROM (select from MetaInfNode where accNo ='X17276.1') TO (select from GenomeGraphNode where seq=141) SET taxid=9646")).execute();

我正在使用Eclipse Mars并将我的项目导出为可运行的jar。 我得到以下异常:

Exception in thread "main" com.orientechnologies.orient.core.command.OCommandExecutorNotFoundException: Cannot find a command executor for the command request: sql.CREATE EDGE MetaInf2kmer FROM (select from MetaInfNode where accNo ='X17276.1') TO (select from GenomeGraphNode where seq=141) SET taxid=9646
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:72)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:42)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:1400)
    at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:67)
    at com.tinkerpop.blueprints.impls.orient.OrientGraphCommand.execute(OrientGraphCommand.java:49)
    at odbMetaInforamtion.OdbAcc2tax.addTaxInfToMetaNode(OdbAcc2tax.java:112)
    at odbMetaInforamtion.OdbAcc2tax.<init>(OdbAcc2tax.java:40)
    at odbGraph.Testmain.main(Testmain.java:35)

我已经搜索了互联网,但我刚发现了一个maven解决方案。 https://github.com/orientechnologies/orientdb/issues/5105 你对eclipse有什么想法吗?

1 个答案:

答案 0 :(得分:0)

添加

orientdb-server-2.1.15.jar

到你的类路径