Embedded DB with Bolt

503 views
Skip to first unread message

Matthias Wegner

unread,
Apr 11, 2017, 10:02:24 AM4/11/17
to Neo4j
Hi All,

i try to get an localhost-access with bolt through an embedded neo4j. For that i used

https://github.com/neo4j/neo4j-documentation/blob/3.1/embedded-examples/src/main/java/org/neo4j/examples/EmbeddedNeo4j.java

and replaced there

graphDb = new GraphDatabaseFactory().newEmbeddedDatabase( DB_PATH );

through the code of

https://github.com/neo4j/neo4j-documentation/blob/3.1/embedded-examples/src/main/java/org/neo4j/examples/EmbeddedNeo4jWithBolt.java

But in the browser is only "not a WebSocket handshake request: missing upgrade" shown when i access localhost:7687.

What did i wrong?

I use Eclipse Neon on an Ubuntu 16.04-System. In that i have an empty Maven-Project with JavaSE-1.8 nad upper code. My POM is

<dependency>
       <groupId>org.neo4j.driver</groupId>
       <artifactId>neo4j-java-driver</artifactId>
       <version>1.2.1</version>
    </dependency>
    <dependency>
       <groupId>org.neo4j</groupId>
       <artifactId>neo4j-ogm-api</artifactId>
       <version>2.1.2</version>
    </dependency>
    <dependency>
       <groupId>org.neo4j</groupId>
       <artifactId>neo4j</artifactId>
       <version>3.1.3</version>
    </dependency>
    <dependency>
       <groupId>org.neo4j</groupId>
       <artifactId>neo4j-bolt</artifactId>
       <version>3.1.3</version>
    </dependency>
    <dependency>
       <groupId>org.neo4j.app</groupId>
       <artifactId>neo4j-server</artifactId>
       <version>3.1.3</version>
    </dependency>

The neo4j-db is "stopped" with "service neo4j stop". Is this correct? Is the embedded started as server?

Could you give me a hint. I tried to find some hours to find a solution, but all Articles which combine "embedded and bolt" seem not to work or help me. Any help would be great.

I am looking for a working example.

Regards,
Matthias

Michael Hunger

unread,
Apr 11, 2017, 3:16:40 PM4/11/17
to ne...@googlegroups.com
Bolt is a currently a remote only protocol.

For embedded use you'd use the Neo4j Java API, which you already found.
You can execute statements with graphDb.execute(statement, params)

Micahel

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

J

unread,
Jul 11, 2018, 5:35:19 PM7/11/18
to Neo4j
Hello Matthias, 

Did you have any progress with that?
Reply all
Reply to author
Forward
0 new messages