I've followed the self-study tutorial in the documentation. I'm
impressed by the emphasis on getting your environment set up
correctly, clearly something that beginners would struggle with.
In Activity 2, you get the following error:

Failed to create database 'seconddb', see the next exception for details

This is with Derby 10.15 and Java 11 on Ubuntu. I also tried 10.14
with the same results.

The error can be fixed if you start the server with a permissive
security policy, for example adding the following to the startup
command

-Djava.security.manager -Djava.security.policy=<(echo 'grant {
permission java.security.AllPermission; };')

Interestingly, once the database has been created, you can restart
Derby without that, and it appears to work. So it might be related to
filesystem creation permissions.

Should the documentation be updated to add the extra argument, or is
there a bug here?

Art

PS Someone else had this problem too and some solutions were
suggested: 
http://apache-database.10148.n7.nabble.com/Derby-newbie-error-seen-creating-seconddb-thru-ij-for-network-server-Derby-td150684.html
- but I think someone following a getting started guide shouldn't have
to delve into the details of security permissions.

Reply via email to