4

Neo4j 2.0 と Python 2.7.6 を使用 - Bulbs パッケージに基づいていくつかのスクリプトを実行しようとしましたが、次のエラーが発生し続けます。

Traceback (most recent call last):
  File "D:/neo4jdb/testingbulbs2.7", line 8, in <module>
    james = g.vertices.create(name="James")
  File "C:\Python27\lib\site-packages\bulbs\element.py", line 565, in create
    resp = self.client.create_vertex(data, keys=_keys)
  File "C:\Python27\lib\site-packages\bulbs\neo4jserver\client.py", line 424, in create_vertex
    return self.create_indexed_vertex(data, index_name, keys=keys)
  File "C:\Python27\lib\site-packages\bulbs\neo4jserver\client.py", line 1027, in create_indexed_vertex
    return self.gremlin(script,params)
  File "C:\Python27\lib\site-packages\bulbs\neo4jserver\client.py", line 384, in gremlin
    return self.request.post(path, params)
  File "C:\Python27\lib\site-packages\bulbs\rest.py", line 128, in post
    return self.request(POST, path, params)
  File "C:\Python27\lib\site-packages\bulbs\rest.py", line 183, in request
    return self.response_class(http_resp, self.config)
  File "C:\Python27\lib\site-packages\bulbs\neo4jserver\client.py", line 217, in __init__
    self.handle_response(response)
  File "C:\Python27\lib\site-packages\bulbs\neo4jserver\client.py", line 249, in handle_response
    response_handler(response)
  File "C:\Python27\lib\site-packages\bulbs\rest.py", line 39, in not_found
    raise LookupError(http_resp)
LookupError: ({'status': '404', 'access-control-allow-origin': '*', 'content-type': 'application/json; charset=UTF-8', 'content-length': '838', 'server': 'Jetty(9.0.z-SNAPSHOT)'}, '{\r\n  "message" : "No such ServerPlugin: \\"GremlinPlugin\\"",\r\n  "exception" : "PluginLookupException",\r\n  "fullname" : "org.neo4j.server.plugins.PluginLookupException",\r\n  "stacktrace" : [ "org.neo4j.server.plugins.PluginManager.extension(PluginManager.java:124)", "org.neo4j.server.plugins.PluginManager.invoke(PluginManager.java:165)", "org.neo4j.server.rest.web.ExtensionService.invokeGraphDatabaseExtension(ExtensionService.java:312)", "org.neo4j.server.rest.web.ExtensionService.invokeGraphDatabaseExtension(ExtensionService.java:134)", "java.lang.reflect.Method.invoke(Unknown Source)", "org.neo4j.server.rest.transactional.TransactionalRequestDispatcher.dispatch(TransactionalRequestDispatcher.java:132)", "org.neo4j.server.rest.security.SecurityFilter.doFilter(SecurityFilter.java:112)", "java.lang.Thread.run(Unknown Source)" ]\r\n}')

一部のエラー メッセージに追加の EOL 文字があることに気付きました。それが問題でしょうか?

4

2 に答える 2

4

エラー メッセージには、「No such ServerPlugin: GremlinPlugin」と記載されています。

Neo4j 2.0 では、gremlin プラグインがコア製品から削除され、個別にインストールする必要があります。ソースはhttps://github.com/neo4j-contrib/gremlin-pluginにあります。

ただし、gremlin-plugin が依存するブループリントは、Neo4j 2.0 ではまだ利用できないようです。

そのため、設計図と gremlin-plugin のソースに手を染めたくない場合は、Neo4j 1.9.5 を使用する方がよいでしょう。

于 2014-01-09T17:40:26.550 に答える
0

Gremlin は neo4j 2.0 で動作しますが、現時点では少しいじる必要があります (以下の手順を参照してください)。おそらく、この春の次の TinkerPop リリースでは、より簡単になるでしょう。Neo4j 2.0 には、Cypher 言語に対する非常に便利な更新が含まれています。以前のバージョンではなく、それを使用することをお勧めします。

git clone https://github.com/tinkerpop/gremlin.git

cd gremlin/gremlin-groovy/

[edit gremlin/gremlin-groovy/pom.xml to uncomment <!--dependency> block containing neo4j2 and comment out neo4j block]

[also edit same file so that neo4j2 block has <scope>compile</scope> (I don't know that this is strictly necessary)]

'mvn clean install' in gremlin/ directory

executable is gremlin/gremlin-groovy/gremlin.sh

If you get an error like:
"groovysh_evaluate: 51: unable to resolve class Neo4jGraph"

use the Neo4j2Graph class like this:

g = new Neo4j2Graph("/usr/local/neo4j-community-2.0.1/data/graph.db")
于 2014-03-21T16:29:03.483 に答える