Can't connect to embedded Derby database in IntelliJ IDEA because database is in use

2.8k views Asked by At

I'm working on an app that uses embedded database (Derby). My IDE is IntelliJ IDEA 14.1.3. I tried creating the database in the IDE:

Database > New > Data Source > Derby > Embedded

The database is created in Program Files, in IDEA's folder. However, I can't access it with this:

Connection connection = DriverManager.getConnection("jdbc:derby:databaseName;create=true");

When I try to connect to the database (using the line above) it creates a new database in the project folder.

Is there a way to easily connect to the database from the app and manage it in IDEA's data source manager?

0

There are 0 answers