Reputation: 18123
I have a working embedded H2 database (..mv.db), which I cannot connect to from IntelliJ IDEA.
The credentials are the same as the Spring application.properties
which uses it, but from the built-in Database tool in IntelliJ Idea I get this strange error upon connecting (or Testing the connection):
[90062][90062] Error while creating file "C:/Program Files (x86)/IntelliJ IDEA 2020.1.2/bin/data" [90062-200].
I have zero clue how to solve this, couldn't find any resource about this problem. My Sping application connects easily (I shut it down before trying to access the same file).
Upvotes: 0
Views: 1263
Reputation: 8188
You need to use the absolute path to database in JDBC URL. Relative path ./data/database/something
in your application and in your IDE are resolved into different directories, because your application and your IDE have different current working directories for oblivious reasons.
Upvotes: 2