I'm currently trying to access an ArangoDB database by using Bulbs and Rexster. I need to do that because I want to use Bulbs (http://bulbflow.com) to launch some gremlin queries from Python. (I really like AQL and arangosh but I already have a lot of working gremlin scripts)
Here is what I did before trying to use Rexster from Bulbs :
- I successfully compiled ArangoDB BluePrint driver and got : blueprints-arangodb-graph-1.0.4-SNAPSHOT-jar-with-dependencies.jar
- I downloaded Gremlin2.4 an Rexster 2.4 binaries and copied blueprints-arangodb-graph-1.0.4-SNAPSHOT-jar-with-dependencies.jar in (respectively) lib and ext folder
I then faced several issues :
1st, (not an Bulbs issue) I didn't succeed in making ArangoDB work correctly with current version of Gremlin (2.4.0) and/or Rexster (2.4.0)
In gremlin 2.4 :
gremlin> import com.tinkerpop.blueprints.impls.arangodb.*
[...]
gremlin> g = ArangoDBGraphFactory.createArangoDBGraph();
==>arangodbgraph[{"_id":"_graphs\/factory_graph","_rev":"20228207","_key":"factory_graph","vertices":"factory_vertices","edges":"factory_edges"}]
gremlin> g.E.count()
Not supported yet.
Display stack trace? [yN]
In bash, while launching Rexster 2.4 :
Exception in thread "main" java.lang.NoSuchFieldError: isRDFModel
at com.tinkerpop.blueprints.impls.arangodb.ArangoDBGraph.<clinit>(ArangoDBGraph.java:44)
at com.tinkerpop.blueprints.impls.arangodb.utils.ArangoDBConfiguration.configureGraphInstance(ArangoDBConfiguration.java:60)
at com.tinkerpop.rexster.config.GraphConfigurationContainer.getGraphFromConfiguration(GraphConfigurationContainer.java:119)
at com.tinkerpop.rexster.config.GraphConfigurationContainer.<init>(GraphConfigurationContainer.java:54)
at com.tinkerpop.rexster.server.XmlRexsterApplication.reconfigure(XmlRexsterApplication.java:99)
at com.tinkerpop.rexster.server.XmlRexsterApplication.<init>(XmlRexsterApplication.java:47)
at com.tinkerpop.rexster.Application.<init>(Application.java:96)
at com.tinkerpop.rexster.Application.main(Application.java:188)
Seing some examples using version 2.2 of both Gremlin and Rexster, I downloaded them and installed again arangodb blueprint driver
This time, it worked in both Gremlin 2.2 and Rexster 2.2 :
- g.E.count() returned something (<-> thus is supported)
- Rexster server launched and I could access Rexster api on port 8182
BUT, the 2nd issue is that the following Python code :
from bulbs.rexster import Graph
from bulbs.config import Config
config = Config('http://localhost:8182/graphs/arangodb')
g = Graph(config)
returned :
({'status': '500', 'transfer-encoding': 'chunked', 'server': 'grizzly/2.2.18', 'connection': 'close', 'date': 'Wed, 08 Jan 2014 17:30:29 GMT', 'access-control-allow-origin': '*', 'content-type': 'application/json'}, '{"message":"","error":"javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: groovy.lang.MissingMethodException.rollback() is applicable for argument types: () values: []\\nPossible solutions: collect(), collect(groovy.lang.Closure), collect(java.util.Collection, groovy.lang.Closure)","api":{"description":"evaluate an ad-hoc Gremlin script for a graph.","parameters":{"rexster.returnKeys":[...]
I don't know how this could be fixed (I'm not a Java programmer, btw)
Here is my env :
- Ubuntu 11.10
- java version "1.7.0_45"
- Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
- Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
Here is my Arango config in rexster.xml (which let me access arangodb from Rexster REST API) :
[...]
<graph>
<graph-name>arangodb</graph-name>
<graph-type>com.tinkerpop.blueprints.impls.arangodb.utils.ArangoDBConfiguration</graph-type>
<properties>
<graph-name>arangodb-rexster-graph</graph-name>
<vertex-name>arangodb-rexster-graph-vertices</vertex-name>
<edge-name>arangodb-rexster-graph-edges</edge-name>
<host>localhost</host>
<port>8529</port>
</properties>
</graph>
[...]
Thanks in advance for any ideas/help :)