我正在尝试通过修改 Rexster 中的 rexster.xml 文件来配置 Rexster 以使用 Titan。但是当我跑步时
http ://localhost:8182/graphs/mygraph
在我的浏览器中,我收到一条消息:
{“消息”:“找不到图 [mygraph]”}。
这是我修改的 rexster.xml 文件的一部分:
<graph>
<graph-name>mygraph</graph-name>
<graph-type>com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration</graph-type>
<graph-location>C:/titan-server-jre6-0.4.4/bin/mygraph</graph-location>
<graph-read-only>false</graph-read-only>
<properties>
<storage.backend>local</storage.backend>
<buffer-size>100</buffer-size>
</properties>
<extensions>
<allows>
<allow>tp:gremlin</allow>
</allows>
</extensions>
</graph>
我已将 Titans lib 文件夹中的所有 jar 文件添加到 config/ext/titan 下的 Rexster 中,并使用 gremlin shell i Titan 在 Titan 中创建了一个图形:
g = TitanFactory.open('mygraph');
g.createKeyIndex('name', Vertex.class);
v = g.addVertex(null);
v.setProperty('name','x');
v.setProperty('type','person');
v.setProperty('age',20);
v1 = g.addVertex(null);
v1.setProperty('name','y');
v1.setProperty('type','person');
v1.setProperty('age',22);
e = g.addEdge(null, v, v1, 'knows');
e1 = g.addEdge(null, v1, v, 'knows');
g.shutdown();
我错过了什么?
[更新]:
我将 Titan 中的 jar 文件放在了 rexster 的错误目录中,现在它们位于 rexster 的正确位置。但是当我现在运行 rexster 服务器时,我得到以下输出:
[INFO] Application - .:Welcome to Rexster:.
[INFO] RexsterProperties - Using [C:\rexster-server-2.5.0\config\rexster.xml] as
configuration source.
[INFO] Application - Rexster is watching [C:\rexster-server-2.5.0\config\rexster
.xml] for change.
Exception in thread "main" java.lang.AbstractMethodError: com.thinkaurelius.tita
n.tinkerpop.rexster.TitanGraphConfiguration.configureGraphInstance(Lcom/tinkerpo
p/rexster/config/GraphConfigurationContext;)Lcom/tinkerpop/blueprints/Graph;
at com.tinkerpop.rexster.config.GraphConfigurationContainer.getGraphFrom
Configuration(GraphConfigurationContainer.java:124)
at com.tinkerpop.rexster.config.GraphConfigurationContainer.<init>(Graph
ConfigurationContainer.java:54)
at com.tinkerpop.rexster.server.XmlRexsterApplication.reconfigure(XmlRex
sterApplication.java:99)
at com.tinkerpop.rexster.server.XmlRexsterApplication.<init>(XmlRexsterA
pplication.java:47)
at com.tinkerpop.rexster.Application.<init>(Application.java:97)
at com.tinkerpop.rexster.Application.main(Application.java:189)
我该如何解决这个问题?