0

Rexster の rexster.xml ファイルを変更して、Titan を使用するように Rexster を構成しようとしています。しかし、私が走るとき

  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 シェル 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)

どうすればこれを解決できますか?

4

1 に答える 1

0

バージョン 2.5.0 を使用する前に、rexster サーバーのバージョンを変更することで問題は解決しました。現在、Titan のバージョン 2.4.0 とバージョン 0.4.4 を使用しています。

于 2014-09-15T12:21:07.900 に答える