将Rexster配置为使用Titan



我试图通过修改Rexster中的Rexster.xml文件来配置Rexster以使用Titan。但当我运行时

  http ://localhost:8182/graphs/mygraph 

在我的浏览器中,我收到一条消息,上面写着:

{"message":"未能找到Graph[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>

我已经在config/ext/titan下将Titans lib文件夹中的所有jar文件添加到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.0configrexster.xml] as
    configuration source. 
    [INFO] Application - Rexster is watching [C:rexster-server-2.5.0configrexster
    .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)

我该如何解决此问题?

在我使用2.5.0版本之前,通过更改rexster服务器的版本解决了问题。我现在使用的是Titan的2.4.0版本和0.4.4版本。

最新更新