That doesn't look like valid Gremlin syntax from the REPL:
gremlin> g = new Neo4jGraph('/tmp/neo4j')
==>neo4jgraph[EmbeddedGraphDatabase [/tmp/neo4j]]
gremlin> g.addVertex([name:'stephen'])
==>v[0]
gremlin> g.V.map
==>{name=stephen}
gremlin> g.commit()
==>null
gremlin> g.shutdown()
==>null
gremlin> g = new Neo4jGraph('/tmp/neo4j')
==>neo4jgraph[EmbeddedGraphDatabase [/tmp/neo4j]]
gremlin> g.V.map
==>{name=stephen}
Alternatively, if you have an existing org.neo4j.graphdb.GraphDatabaseService
instance that you would like to use you can pass that into the Neo4jGraph
constructor instead of the path to where the db files are (or where you would like them to be).