I fear Rexster has issues with hyper-edges (the 2.5.0 at least); here's a simple snippet of code to reproduce the issue, copy/pasted from a previous email here on the list:
g = rexster.getGraph("graph")
mgmt = g.getManagementSystem()
p_name = mgmt.makePropertyKey('name').dataType(String.class).make()
p_through = mgmt.makeEdgeLabel('through').unidirected().make()
mgmt.buildIndex('byName', Vertex.class).addKey(p_name).buildCompositeIndex()
mgmt.commit()
v = g.addVertex(['name': 'Anne'])
u = g.addVertex(['name': 'Bob'])
w = g.addVertex(['name': 'Eve'])
v.addEdge('knows', u).setProperty('through', w)
g.commit()
If you point rexster to get the v node (in my case with ID 256) it works as expected:
{"version":"2.5.0","results":{"name":"Anne","_id":256,"_type":"vertex"},"queryTime":10.315556}
But trying to retrieve the out-edges fails miserably:
{"message":null,"error":null}
The log file contains an anonymous:
395215 [Grizzly(3)] ERROR com.tinkerpop.rexster.VertexResource - java.lang.NullPointerException
But on our production server, where we first had this bug tonight, we got something more meaningful:
127234354 [Grizzly(3)] ERROR com.tinkerpop.rexster.gremlin.GremlinExtension - Gremlin Extension: null
java.lang.NullPointerException
at java.util.HashSet.<init>(HashSet.java:116)
at com.tinkerpop.blueprints.util.io.graphson.GraphSONUtility.objectNodeFromElement(GraphSONUtility.java:405)
at com.tinkerpop.blueprints.util.io.graphson.GraphSONUtility.createJSONMap(GraphSONUtility.java:559)
at com.tinkerpop.blueprints.util.io.graphson.GraphSONUtility.objectNodeFromElement(GraphSONUtility.java:218)
at com.tinkerpop.blueprints.util.io.graphson.GraphSONUtility.jsonFromElement(GraphSONUtility.java:198)
at com.tinkerpop.blueprints.util.io.graphson.GraphSONUtility.jsonFromElement(GraphSONUtility.java:388)
at com.tinkerpop.rexster.gremlin.converter.JSONResultConverter.prepareOutput(JSONResultConverter.java:98)
at com.tinkerpop.rexster.gremlin.converter.JSONResultConverter.convert(JSONResultConverter.java:67)
at com.tinkerpop.rexster.gremlin.GremlinExtension.tryExecuteGremlinScript(GremlinExtension.java:278)
at com.tinkerpop.rexster.gremlin.GremlinExtension.evaluateGetOnGraph(GremlinExtension.java:175)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
I'm sure Stephen will find and fix the bug in a flash, but in case it's something more complicated than what it seems, does anybody know a workaround for this?
Thank you
--
Dott. Stefano Parmesan
Backend Web Developer and Data Lover ~ SpazioDati s.r.l.
Via Adriano Olivetti, 13 – 4th floor
"Le Albere" district – 38122 Trento – Italy