Search code examples
jdbcderby

Derby connection error: ERROR XBM0H: Directory /usr/opt/derby/db-derby-10.12.1.1-bin/bin/MyDbTest cannot be created


I am trying to setup Derby on my Mac following these instructions... Tutorial

When I try to run connect 'jdbc:derby:MyDbTest;create=true'; in ij I get the following error

ERROR XJ041: Failed to create database 'MyDbTest', see the next exception for details. ERROR XBM0H: Directory /usr/opt/derby/db-derby-10.12.1.1-bin/bin/MyDbTest cannot be created.

I have tried googling this error a bit now with no success...

I also get a thread "main" java.lang.NoClassDefFoundError: org/apache/derby/tools/ij when trying to run as super user.


Solution

  • This should be a Permissions issue, try running all these commands throught a directory you have full permissions to such as ~/Documents/Derby.