neo4j-contrib / gremlin-plugin

A Plugin for the Neo4j server add Tinkerpop-related functionality
Other
55 stars 23 forks source link

Plugin doesn't show up in extensions #32

Closed gataky closed 9 years ago

gataky commented 9 years ago

I've installed the plugin per the directions given. It actually works when I use curl from the command line with a simple query. The problem is when I try to get a list of extensions registered by the server, nothing shows up.

I've added this line to my config file and restarted the server

org.neo4j.server.thirdparty_jaxrs_classes=com.thinkaurelius.neo4j.plugins=/tp

Logs show "No provider classes found." which may be a clue?

Mar 18, 2015 4:14:15 PM com.sun.jersey.api.core.PackagesResourceConfig init
INFO: Scanning for root resource and provider classes in the packages:
  com.thinkaurelius.neo4j.plugins
Mar 18, 2015 4:14:15 PM com.sun.jersey.api.core.ScanningResourceConfig logClasses
INFO: Root resource classes found:
  class com.thinkaurelius.neo4j.plugins.GremlinPlugin
Mar 18, 2015 4:14:15 PM com.sun.jersey.api.core.ScanningResourceConfig init
INFO: No provider classes found.
Mar 18, 2015 4:14:15 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.9 09/02/2011 11:17 AM'
Mar 18, 2015 4:14:16 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.9 09/02/2011 11:17 AM'
Mar 18, 2015 4:14:16 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.9 09/02/2011 11:17 AM'
Mar 18, 2015 4:14:16 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.9 09/02/2011 11:17 AM'

Testing the gremlin plugin with curl:

$ curl -s -G --data-urlencode 'script=g.V()' http://localhost:7474/tp/gremlin/execute
{"success":true,"results":[{"_id":0,"_type":"vertex"}]}

Trying to get a list of extension that are installed:

$ curl -s -G http://localhost:7474/db/data/
{
  "extensions" : {
  },
  "node" : "http://localhost:7474/db/data/node",
  "node_index" : "http://localhost:7474/db/data/index/node",
  "relationship_index" : "http://localhost:7474/db/data/index/relationship",
  "extensions_info" : "http://localhost:7474/db/data/ext",
  "relationship_types" : "http://localhost:7474/db/data/relationship/types",
  "batch" : "http://localhost:7474/db/data/batch",
  "cypher" : "http://localhost:7474/db/data/cypher",
  "indexes" : "http://localhost:7474/db/data/schema/index",
  "constraints" : "http://localhost:7474/db/data/schema/constraint",
  "transaction" : "http://localhost:7474/db/data/transaction",
  "node_labels" : "http://localhost:7474/db/data/labels",
  "neo4j_version" : "2.1.7"
}

Notice the extensions is an empty set

I would expect to see something like:

...
"extensions": { "GremlinPlugin": {"execute_script": "http://localhost:7474/tp/gremlin/execute"}}
...

Something along those lines.

I'm using a third party library to develop with Neo4j and it's expecting the extensions section to be populated with the plugins.

Am I missing something or is this a know bug?

Thanks

jexp commented 9 years ago

I think you're mixing it up the gremlin plugin from Aurelius is actually an unmanaged server extension (jax-rs resource) which is not listed as a plugin.

The plugin from this repository is a ServerPlugin which is listed as extension.

I recommend to go with the aurelius plugin and use a rest-client to access it's endpoint.