0
votes

I created plugin in neo4j by next steps:

1) create *.class from *.java (copile with Eclipse)

2) put *.class into .../org/neo4j/server/plugins/

3) create *.jar (using jar)

4) put into *.jar/META-INF/services/ file "org.neo4j.server.plugins.ServerPlugin" with text "org.neo4j.server.plugins.TransportRouter".

5) put *.jar into .../neo4j/plugins/

6) restart server

But my plugin do not see in "extensions" ("curl localhost:7474/db/data/").

Why?

TIA, Eugeny.

3
I write about create my plugin here: vinger4.blogspot.com/2012/09/create-neo4j-plugin.html - Evgenii

3 Answers

1
votes

Adding this answer for the benefit of others. I had similar problem but it was not a issue with the code. You need to make sure neo4j server is stopped before you copy the jar in plugins directory. If you copy it before its stopped then restart it. It will not work. I tried this on both 1.8.2 and 1.9.2

Simple steps to be added for installing plugin

  1. Stop the neo4j server
  2. Copy the plugin jar file in plugins directory.
  3. start the neo4j server

Your plugin should be detected. This issue was reproducible with the example plugin GetAll as well. Hope this helps others.

0
votes

Eugeny can you list the content of the jar jar tf your-jar.jar and the source code of your class.

Do you depend on any other libraries?

please see the Neo4j manual for the needed steps.

0
votes

Problem was solved.

It's my error in initialization of my class:

public TransportRouter( EmbeddedReadOnlyGraphDatabase graphdb ) {

It was replaced by:

public TransportRouter() {