Neo4j: Running Embedded Server with WebConsole
Took me couple of hours to figure this out so blogging it, hopefully it helps someone else.
If you are running Neo4j in embedded mode, you can still get the web console, data browser and other goodies, they do mention this in the manual but what they don’t mention is that you will need 2 extra jars to do this neo4j-server.jar and neo4j-server-static-web.jar and these are not available on neo’s repo, so you will have to clone their source from git and build it locally.
Add them to your pom.xml
<dependency> <groupId>org.neo4j.app</groupId> <artifactId>neo4j-server</artifactId> <version>1.5.M01</version> </dependency> <dependency> <groupId>org.neo4j.app</groupId> <artifactId>neo4j-server</artifactId> <version>1.5.M01</version> <classifier>static-web</classifier> </dependency>
Notice the “classifier” in the above code. Below is the code for how you would start it.
EmbeddedGraphDatabase db = new EmbeddedGraphDatabase(<path>); bootstrapper = new WrappingNeoServerBootstrapper(db); bootstrapper.start();
Once you get the web console you will be able to run Cypher queries but not Gremlin, to be able to run Gremlin queries too include it into your classpath.
<dependency> <groupId>com.tinkerpop</groupId> <artifactId>gremlin</artifactId> <version>1.3</version> <type>jar</type> <exclusions> <!-- Sail support not needed --> <exclusion> <groupId>com.tinkerpop.blueprints</groupId> <artifactId>blueprints-sail-graph</artifactId> </exclusion> <!-- Maven support in groovy not needed --> <exclusion> <groupId>org.codehaus.groovy.maven</groupId> <artifactId>gmaven-plugin</artifactId> </exclusion> <!-- "readline" not needed - we only expose gremlin through webadmin --> <exclusion> <groupId>jline</groupId> <artifactId>jline</artifactId> </exclusion> </exclusions> </dependency>
- Reading and Writing Java Property Files With Ruby
- Dynamically updating JBoss Rules with Spring
- Neo4j: Running Embedded Server with WebConsole
- YAY I finally got OtpErlang.jar
- Clojure, JDBC and using Dates.
- Denormalizing One million records with Clojure.
- Redis and Clojure
- Deleting those pesky RFC-822 in-compatible emails with Ruby
- Use Ruby to Prefix all lines /Postfix all lines/Remove empty lines/Replace strings in all lines of a file
- Book List
- “@antirez: "Most change comes from a few people working hard." +1...” 4 months ago
- To go clipless or not ? 1 year ago
- went for a 36.2 mile road ride. app.strava.com/activities/536… #strava 1 year ago
- creepy suitabletech.com 1 year ago
- Sacramento couple fights to get their baby boy back from authorities | news10.net on.news10.net/Yg2nkt via @News10_CA 1 year ago