Hi

There is a very long stack trace, and the last few lines of the log file are

Cleanup action completed
Fri Aug 06 00:47:55 AEST 2021 Thread[DRDAConnThread_2,5,main]
(DATABASE = seconddb), (DRDAID = {1}), Failed to create database
'seconddb', see the next exception for details.
Fri Aug 06 00:47:55 AEST 2021 Thread[DRDAConnThread_2,5,main]
(DATABASE = seconddb), (DRDAID = {1}), Startup failed due to an
exception. See next exception for details.
Fri Aug 06 00:47:55 AEST 2021 Thread[DRDAConnThread_2,5,main]
(DATABASE = seconddb), (DRDAID = {1}), Java exception: 'access denied
("java.lang.RuntimePermission" "getenv.SOURCE_DATE_EPOCH"):
java.security.AccessControlException'.

I'll post the stack trace too if you need it.

Thanks

Art

On Fri, 6 Aug 2021 at 00:36, Rick Hillegas <rick.hille...@gmail.com> wrote:
>
> Using Derby 10.15.2.0 and Open JDK 11 (build 11+28) on Mac OSX 11.2.3, I
> get good, expected results from activity 2 at
> https://db.apache.org/derby/docs/10.15/getstart/twwdactivity2.html
>
> Can you tell us what you see in derby.log when you run activity 2 and
> start up the server with the following additional system properties:
>
>    -Dderby.language.logStatementText=true
> -Dderby.stream.error.logSeverityLevel=0
>
> Thanks,
> -Rick
>
>
> On 8/4/21 7:49 PM, Art O Cathain wrote:
> > 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