# Cannot find GraphDatabaseFactory

**URL:** <https://community.neo4j.com/t/cannot-find-graphdatabasefactory/10955>\
**Category:** Neo4j 4.0\
**Created:** [October 12, 2019, 10:15am UTC](https://community.neo4j.com/t/cannot-find-graphdatabasefactory/10955 "2019-10-12T10:15:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![farsimple](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/farsimple/32/6881_2.png) [@farsimple](https://community.neo4j.com/u/farsimple)\
**Post date:** [October 12, 2019, 10:15am UTC](https://community.neo4j.com/t/cannot-find-graphdatabasefactory/10955/1 "2019-10-12T10:15:29Z")

</div>

I have downloaded Neo4j 4.0 MR2 and I am trying to embed it into a Scala 2.12.8 application that I am working on. I have added the downloaded lib folder as unmanaged dependencies in my build.sbt, and I can import Neo4j classes into my application in IntelliJ.

The getting started examples for embedding Neo4j into a Java application use the GraphDatabaseFactory to create a GraphDatabaseService instance. However, I cannot find and import GraphDatabaseFactory. I see the org.neo4j.graphdb.factory package, but it does not include GraphDatabaseFactory, or any other factory such as EnterpriseGraphDatabaseFactory. What am I missing?

---

<div class="post-metadata">

**Author:** ![stefan.armbruster](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/stefan.armbruster/32/74_2.png) [@stefan.armbruster](https://community.neo4j.com/u/stefan.armbruster)\
**Post date:** [October 13, 2019, 2:08pm UTC](https://community.neo4j.com/t/cannot-find-graphdatabasefactory/10955/2 "2019-10-13T14:08:48Z")

</div>

From what I see in the code you use `org.neo4j.dbms.api.DatabaseManagementServiceBuilder` as entry point. From there you get a `DatabaseManagementService` which allows you to create and start databases.

---

<div class="post-metadata">

**Author:** ![farsimple](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/farsimple/32/6881_2.png) [@farsimple](https://community.neo4j.com/u/farsimple)\
**Post date:** [October 13, 2019, 3:45pm UTC](https://community.neo4j.com/t/cannot-find-graphdatabasefactory/10955/3 "2019-10-13T15:45:42Z")

</div>

Thanks! Where is this code example? Looks like I have missed it...

---

<div class="post-metadata">

**Author:** ![stefan.armbruster](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/stefan.armbruster/32/74_2.png) [@stefan.armbruster](https://community.neo4j.com/u/stefan.armbruster)\
**Post date:** [October 14, 2019, 2:37am UTC](https://community.neo4j.com/t/cannot-find-graphdatabasefactory/10955/4 "2019-10-14T02:37:36Z")

</div>

Sorry, but cource code of 4.0 MR2 has not been published. I suspect it will be published for a upcoming MR.

---

<div class="post-metadata">

**Author:** ![farsimple](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/farsimple/32/6881_2.png) [@farsimple](https://community.neo4j.com/u/farsimple)\
**Post date:** [October 14, 2019, 4:21am UTC](https://community.neo4j.com/t/cannot-find-graphdatabasefactory/10955/5 "2019-10-14T04:21:58Z")

</div>

ok, thanks for the info but what's the point of releasing the MR if the changes are so significant that one does not even know how to create a database to test it? shouldn't the preliminary documentation at least cover that? I think this is a natural expectation since this MR is suggested as a fix for issue #8832 on github. hope this is fixed for the the upcoming MR...
