Neo4j Inside Eclipse

281 views
Skip to first unread message

Amit Aggarwal

unread,
Aug 30, 2013, 12:54:36 AM8/30/13
to ne...@googlegroups.com

I am developing a server plugin for neo4j. I want to run neo4j inside eclipse as well as debug my newly develop plugin also.

I read tutorial http://blog.neo4j.org/2012/03/how-to-set-up-maven-project-with-neo4j.html on how to include neo4j in eclipse but still I am not able to run Neo4j through eclipse.

Secondly, If I were able to run neo4j then in which directory would I develop my plugin ?

I am bit confuse on these two fronts.

Any Help Thanks

Michael Hunger

unread,
Aug 30, 2013, 1:14:14 AM8/30/13
to ne...@googlegroups.com
You would package your plugin according to the packages your company usually uses.

Here is an example on how to use an embedded Neo4j server for testing:


Make sure that your src/main/resources/META-INF/services ServerPlugin file is set up correctly according to the docs.

Michael

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Peter Neubauer

unread,
Aug 30, 2013, 1:14:30 AM8/30/13
to Neo4j User

Amit,
I think setting up eclipse for ruining the server in debug mode is more complicated than in the video. I would just deploy the plugin to the normal server and run the server process with remote debugging. Would that work?

/peter

(snt)-[frm]->(phn)

--

Amit Aggarwal

unread,
Aug 30, 2013, 2:44:38 AM8/30/13
to ne...@googlegroups.com
Hello Peter,

Well May be I am able to understand you my problem..

Step 1 : I wrote one plugin in eclipse , I compile it so I got GetAll.class file.
Step 2: I moved 'GetAll.class' to /var/www/neo4j/plugins/ directory and did all jar things (exactly as documented)
Step 3: I call my plugin using curl and it worked , no problem..

But My problem is , even If i make any changes to my plugin , even of a single variable , again and again I have repeat step 1 and step 2 and step 3
More over I am not able to debug my 'GetAll.java' file.


How can i rid of the method so that I can write my plugin in eclipse , deploy it there only and can debug there itself.

I hope I am understandable now :)
Any Help

Michael Hunger

unread,
Aug 30, 2013, 2:50:01 AM8/30/13
to ne...@googlegroups.com
Amit,

did you see my answer? You can run an embedded Neo4j server for testing/debugging purposes within an JUnit Integration test.

Michael

Peter Neubauer

unread,
Aug 30, 2013, 2:49:56 AM8/30/13
to Neo4j User
Amit,
for 3), see http://docs.neo4j.org/chunked/stable/server-debugging.html on how to set up Neo4j server for remote debugging. In Eclipse, just follow the standard guides like http://javarevisited.blogspot.se/2011/02/how-to-setup-remote-debugging-in.html.

You can automate step 1) and 2) by just having a small shell script:

#!/bin/sh
javac .....
//build your plugin.zip
neo4j stop
cp plugin.zip $NEO4J_HOME/plugins/
neo4j start



/peter


G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

Kids in Malmö this summer?        - http://www.kidscraft.se
Neo4j questions? Use GraphGist. - http://gist.neo4j.org

Amit Aggarwal

unread,
Aug 30, 2013, 2:54:44 AM8/30/13
to ne...@googlegroups.com
Hello Micheal,

First of all Thanks a lot for such a responded answer , I questioned and you  answered instantly.

Well , can we use all functionality in serverplugin that we can do in embedded server or there is any limitations ?

Thanks

Amit Aggarwal

unread,
Aug 30, 2013, 2:55:52 AM8/30/13
to ne...@googlegroups.com
Hello Peter,

First of all thanks for instant answer.
Great and glad to be part of this community.

Well I will try your solution..

Thanks
Amit Aggarwal
Reply all
Reply to author
Forward
0 new messages