I can't say I fully follow, but if you are executing this from the Gremlin REPL:
_g := neo4j:open('../gephiData/neo4j-community-1.9/data/graph.db')
you are likely getting that error because it isn't valid Gremlin. The appropriate way to open a Graph
is:
g = new Neo4jGraph('../gephiData/neo4j-community-1.9/data/graph.db')
As mentioned in the comments to this question here, make sure that Neo4j is not running in some other process when you try to do this.
From there you could go about subgraphing to a TinkerGraph
and saving that graph as GraphML. You can see a bit more on the approach to subgraphing with Gremlin here: