espeed / bulbs

A Python persistence framework for graph databases like Neo4j, OrientDB and Titan.
http://bulbflow.org
Other
622 stars 83 forks source link

error creating a vertex #120

Open binarymatt opened 10 years ago

binarymatt commented 10 years ago

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.

espeed commented 10 years ago

Hi - What version of Neo4j Server are you running?

binarymatt commented 10 years ago

Neo4j Community Edition 2.0.0

espeed commented 10 years ago

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.

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/espeed/bulbs/issues/120#issuecomment-32767007 .

FrostyX commented 10 years ago

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?

FrostyX commented 10 years ago

With neo4j-server-1.9.6 code gives no error.

espeed commented 10 years ago

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

FrostyX commented 10 years ago

Yes, and I have up to date version.

atomos commented 10 years ago

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

JobJob commented 10 years ago

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?

espeed commented 10 years ago

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.

JobJob commented 10 years ago

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!

arusahni commented 10 years ago

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

JobJob commented 10 years ago

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: https://github.com/espeed/bulbs/issues/120#issuecomment-41395071

dbunskoek commented 10 years ago

@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...

dbunskoek commented 10 years ago

Nevermind, I found it :)

s7ephen commented 9 years ago

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?

JobJob commented 9 years ago

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

s7ephen commented 9 years ago

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

JobJob commented 9 years ago

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?

JobJob commented 9 years ago

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.