How to use ArangoDB with bulbs and rexters?

I am currently trying to access the ArangoDB database using Bulbs and Rexster. I need to do this because I want to use Bulbs ( http://bulbflow.com ) to run some gremlin requests 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 the ArangoDB BluePrint driver and got: blueprints-arangodb-graph-1.0.4-SNAPSHOT-jar-with-dependencies.jar
  • I downloaded the Rexster 2.4 binaries Gremlin2.4 and copied the drawings-arangodb-graph-1.0.4-SNAPSHOT-jar-with-dependencies.jar to the (respectively) lib and ext folder

Then I came across several problems:

1st, (not a problem with light bulbs) I was unable to make ArangoDB work correctly with the 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, when starting 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)

Having cited some examples using version 2.2 of both Gremlin and Rexster, I downloaded them and installed the arangodb project driver again

This time it worked in both Gremlin 2.2 and Rexster 2.2:

  • gEcount () returns something (↔ is thus supported)
  • Rexster server is running and I was able to access the Rexster api on port 8182

BUT, the second problem is the following Python code:

from bulbs.rexster import Graph
from bulbs.config import Config
config = Config('http://localhost:8182/graphs/arangodb')
g = Graph(config)

:

({'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 to fix this (I'm not a Java programmer, by the way)

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)

Arango rexster.xml( arangodb 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>
[...]

/:)

+4
5

ArangoDB Blueprints, , . pom, , 1.0.4-SNAPSHOT TinkerPop 2.3.0. , Gremlin/Rexster 2.3.0 . , Rexster , Bulbs. , Rexster Gremlin Extension , , Python.

+3

rexster 2.4: 2.4- https://github.com/triAGENS/blueprints-arangodb-graph, rexster/gremlin 2.4

+2

, Stephen Mallete , , gremlin rexster.xml. curl Rexster , , . , .

+1

ArangoDB: gremlin, rexster . gremlin, rexster. + s.t. .

+1

g.E.count()

I tried using the same syntax with orient-DB. It is not supported there either. So I think he has the smell of a bug in Gremlin 2.4

The workaround is simple, use

g.getEdges().count()
+1
source

All Articles