0

我目前正在编写一个 Infinite Graph Database Scanner,用户可以通过提供 *.boot 文件连接到远程 InfiniteGraph。我正在使用 InfiniteGraph 的蓝图实现

com.tinkerpop.blueprints.impls.ig.IGGraph

现在,当机器已经安装了 InfiniteGraph 版本时,代码可以完美运行,但在其他情况下会失败。我尝试将安装目录中的bin 文件夹与我的项目捆绑在一起,但它仍然失败。我正在使用的代码:

IGGraph graph = new IGGraph("D:\\PROPERTY_GRAPH_TEST.boot");

for (Vertex vertex : graph.getVertices()) {
    System.out.println("vertex.toString() = " + vertex.toString());
}

我得到的例外:

Exception in thread "main" java.lang.RuntimeException: com.objy.db.ObjyRuntimeException: Query setup error: Configuration Error: Unable to find the objectivity.crg file.
 at com.tinkerpop.blueprints.impls.ig.IGGraph.<init>(IGGraph.java:67)
 at com.globalids.test.TestIGGraph.main(TestIGGraph.java:13)
Caused by: com.objy.db.ObjyRuntimeException: Query setup error: Configuration Error: Unable to find the objectivity.crg file.
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
 at com.objy.pm.ErrorManager.exceptionToThrow(Unknown Source)
 at com.objy.pm.ErrorManager.interpretKernelErrors(Unknown Source)
 at com.objy.pm.ErrorManager.checkRegisteredErrors(Unknown Source)
 at com.objy.pm.ExternalInterface.localErrorCheck(Unknown Source)
 at com.objy.pm.ExternalInterface.checkedLong(Unknown Source)
 at com.objy.pm.ExternalInterface.QueryScanItr(Unknown Source)
 at com.objy.pm.QueryScanItr.<init>(Unknown Source)
 at com.objy.db.internal.Query.execute(Unknown Source)
 at com.infinitegraph.impl.ConnectionManager.verifyCompatability(ConnectionManager.java:211)
 at com.infinitegraph.impl.ConnectionManager.connect(ConnectionManager.java:98)
 at com.infinitegraph.GraphFactory.openGraph(GraphFactory.java:227)
 at com.infinitegraph.GraphFactory.open(GraphFactory.java:86)
 at com.tinkerpop.blueprints.impls.ig.IGGraph.<init>(IGGraph.java:62)
 ... 1 more

任何人都可以帮助解决这个问题吗?

先感谢您。

4

1 回答 1

2

谢谢你的问题。事实上,分发需要的不仅仅是复制的“bin”才能成功运行。您能否确保将“etc”和“plugins”目录分别复制到与“bin”目录相同的目录中?这是因为 InfiniteGraph 使用“bin”目录的位置来查找“etc”和“plugins”目录(文件、objectivity.crg. 和其他所需文件所在的位置)中的其他配置文件。如果您有任何其他问题,可以发送电子邮件至 support@objectivity.com。谢谢!

于 2013-06-26T19:11:59.587 回答