espeed / bulbs

A Python persistence framework for graph databases like Neo4j, OrientDB and Titan.

Home Page:http://bulbflow.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error creating a vertex

binarymatt opened this issue · comments

i'm following the guide in the docs and i am getting the following error when I try to create my first vertex, james = g.vertices.create(name="James").

({'status': '400', 'access-control-allow-origin': '*', 'content-type': 'application/json; charset=UTF-8', 'content-length': '1113', 'server': 'Jetty(9.0.5.v20130815)'}, '{\n  "message" : "javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: groovy.lang.MissingMethodException.setMaxBufferSize() is applicable for argument types: () values: []",\n  "exception" : "BadInputException",\n  "fullname" : "org.neo4j.server.rest.repr.BadInputException",\n  "stacktrace" : [ "org.neo4j.server.plugin.gremlin.GremlinPlugin.executeScript(GremlinPlugin.java:88)", "java.lang.reflect.Method.invoke(Method.java:606)", "org.neo4j.server.plugins.PluginMethod.invoke(PluginMethod.java:61)", "org.neo4j.server.plugins.PluginManager.invoke(PluginManager.java:168)", "org.neo4j.server.rest.web.ExtensionService.invokeGraphDatabaseExtension(ExtensionService.java:312)", "org.neo4j.server.rest.web.ExtensionService.invokeGraphDatabaseExtension(ExtensionService.java:134)", "java.lang.reflect.Method.invoke(Method.java:606)", "org.neo4j.server.rest.transactional.TransactionalRequestDispatcher.dispatch(TransactionalRequestDispatcher.java:132)", "org.neo4j.server.rest.security.SecurityFilter.doFilter(SecurityFilter.java:112)", "java.lang.Thread.run(Thread.java:744)" ]\n}')

Any idea what I might be doing wrong? I'm using neo4j and have followed the user guide.

Hi - What version of Neo4j Server are you running?

Neo4j Community Edition 2.0.0

Hi -

The Neo4j 2 Blueprints/Gremlin implementation was just merged a few days
ago into Blueprints 2.5-SNAPSHOT, and there are still some issues to iron
out.

See https://groups.google.com/d/topic/gremlin-users/ICiWgw_wAJE/discussion

If you're down to experiment, make sure you're using the latest
Blueprints/Gremlin and let us know how it goes.

Or if you want something more stable, use Neo4j 1.9x until the 2.0 updates
are fully tested.

  • James

On Mon, Jan 20, 2014 at 9:11 AM, binarydud notifications@github.com wrote:

Neo4j Community Edition 2.0.0


Reply to this email directly or view it on GitHubhttps://github.com//issues/120#issuecomment-32767007
.

Hi,
I am using neo4j-server-2.0.1 and today version of gremlin-plugin and I get same error.

Any chance to solve this issue?

With neo4j-server-1.9.6 code gives no error.

@FrostyX Are you using the Gremlin Plugin from GitHub master: https://github.com/neo4j-contrib/gremlin-plugin ?

Yes, and I have up to date version.

Same issue for me with neo4j-community-2.0.1 and the latest gremlin-plugin on github.

Yeah I have the exact same issue on OSX 10.7.5 with Gremlin Plugin from GitHub master: https://github.com/neo4j-contrib/gremlin-plugin
Anyone managed to get bulbs working with neo4j 2.0?

Hi All - I've been slammed so I haven't had time to fix this, but if anyone wants to, it should just be a matter of updating the neo4jserver/gremlin.groovy to Blueprints/Gremlin 2.5 -- the rexster/gremlin.groovy has already been updated for gremlin 2.5 so you can reference it for hints. I'll be in and out all day, but ping me if you have any questions.

Hi submitted a pull request, I just replaced neo4jserver/gremlin.groovy with the one in rexster/gremlin.groovy (in my site packages) and it seems to work, haven't tested it much though. Cheers James!

I'm still getting this error. Was the pull request merged in?

Um don't remember, but maybe not. The fix is easy as I described though.

--- Original Message ---

From: "Aru Sahni" notifications@github.com
Sent: 25 April 2014 4:57 PM
To: "espeed/bulbs" bulbs@noreply.github.com
Cc: "JobJob" jobba1@hotmail.com
Subject: Re: [bulbs] error creating a vertex (#120)

I'm still getting this error. Was the pull request merged in?


Reply to this email directly or view it on GitHub:
#120 (comment)

@JobJob can you point me into the direction of your pull request, so I can do this in my own repo? I'm also getting this error, and I can't move on as it is...

Nevermind, I found it :)

Did this ever get resolved?

Python 2.7.6 (default, Mar 22 2014, 22:59:56) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from bulbs.neo4jserver import Graph, Config, NEO4J_URI 
>>> config = Config(NEO4J_URI, "james", "secret") 
>>> g = Graph(config) 
>>> print NEO4J_URI 
http://localhost:7474/db/data/
>>> james = g.vertices.create(name="James") 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/bulbs-0.3.29_20141106-py2.7.egg/bulbs/element.py", line 565, in create
    resp = self.client.create_vertex(data, keys=_keys)
  File "/usr/local/lib/python2.7/dist-packages/bulbs-0.3.29_20141106-py2.7.egg/bulbs/neo4jserver/client.py", line 424, in create_vertex
    return self.create_indexed_vertex(data, index_name, keys=keys)
  File "/usr/local/lib/python2.7/dist-packages/bulbs-0.3.29_20141106-py2.7.egg/bulbs/neo4jserver/client.py", line 1054, in create_indexed_vertex
    return self.gremlin(script,params)

...

ValueError: ({'status': '400', 'access-control-allow-origin': '*', 'content-type': 'application/json; charset=UTF-8', 'content-length': '5140', 'server': 'Jetty(9.0.5.v20130815)'}, '{\n  "message" : "javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: groovy.lang.MissingMethodException.setMaxBufferSize() is applicable for argument types: () values: []",\n  "exception" : "BadInputException",\n  "fullname" : "org.neo4j.server.rest.repr.BadInputException",\n  "stacktrace" : [ "org.neo4j.server.plugin.gremlin.GremlinPlugin.executeScript(GremlinPlugin.java:93)", "java.lang.reflect.Method.invoke(Method.java:606)", "org.neo4j.server.plugins.PluginMethod.invoke(PluginMethod.java:61)", "org.neo4j.server.plugins.PluginManager.invoke(PluginManager.java:159)", "org.neo4j.server.rest.web.ExtensionService.invokeGraphDatabaseExtension(ExtensionService.java:312)", "org.neo4j.server.rest.web.ExtensionService.invokeGraphDatabaseExtension(ExtensionService.java:134)", "java.lang.reflect.Method.invoke(Method.java:606)", 

How is anyone supposed to actually get started using Bulbs if it doesn't work out of box for the latest versions of both Gremlin-Plugin/Gremlin and Neo4J?

Yeah it's a shame I personally haven't been using it, but fix (for 9 months ago's version) is above.

@JobJob so what was the fix!? To cp -r rexster/gremlin.groovy to $NEO4JWORKINGDIR/ ? What if you aren't using rexster?

Yep, from memory that just puts a newer version of gremlin.groovy which is more compatible with bulbs/whatever the problem was :) apologies I've forgotten, did you try it, did it work?

paraphrasing myself above: in my site packages/bulbs I just cp rexster/gremlin.groovy neo4jserver/ i.e. replacing the one in the neo4jserver folder with the one from rexster/gremlin.groovy which is more up to date apartment, and it seemed to work, haven't tested it much.