[ 
https://issues.apache.org/jira/browse/DERBY-5146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13010485#comment-13010485
 ] 

Myrna van Lunteren commented on DERBY-5146:
-------------------------------------------

The initial error you were getting is typically a network server configuration 
issue. 
Could be a mismatch between the OS-level permissions. I assume you've checked 
that the user starting the network server actually can write in the 
/home/user/dbbackup directory...
Or (my guess for this case) could be the result of some mismatch between what's 
allowed in the security policy file used by the network server and what 
directory you're telling it to write to. 
The default policy file (part of derbynet.jar) gets you access to 
derby.system.home, but can't know about other directories on your system.
You'll want to add a java.io.FilePermission for /home/user/dbbackup.
For more information on how to setup & run with your own policy file, see:
http://db.apache.org/derby/docs/10.7/devguide/devguide-single.html#cdevcbabejdfj
To see more information about the default policy file see: 
 
http://db.apache.org/derby/docs/10.7/adminguide/adminguide-single.html#tadminnetservcustom
To review how to modify the policy file to provide access to 
/home/user/dbbackup, see:
 
http://db.apache.org/derby/docs/10.7/adminguide/adminguide-single.html#tadminnetservcustom

Please close this issue if this gets you over the bump.

Otherwise, please provide more details, such as your policy file in use, 
permissions of the directory involved, whether or not this has worked before on 
this system or other systems, contents of derby.log (there will be a stack 
printed out somewhere).


> SYSCS_UTIL.SYSCS_BACKUP_DATABASE doesn't work under AIX
> -------------------------------------------------------
>
>                 Key: DERBY-5146
>                 URL: https://issues.apache.org/jira/browse/DERBY-5146
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.7.1.1
>         Environment: Tested under AIX 7 and AIX 5.3
> uname -a
> AIX XXX 1 7 00F641444C00
> AIX XXX 3 5 000036E8D700
> Java -version
> java version "1.6.0"
> Java(TM) SE Runtime Environment (build pap6460sr8fp1-20100624_01(SR8 FP1))
> IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 AIX ppc64-64 
> jvmap6460sr8ifx-20100609_59383 (JIT enabled, AOT enabled)
> J9VM - 20100609_059383
> JIT  - r9_20100401_15339ifx2
> GC   - 20100308_AA)
> JCL  - 20100624_01
>            Reporter: Marc 
>
> I get the follow error when I try to start a backup from the Derby database:
> user@aixx7 578> java -cp "/home/user/lib/derbyrun.jar" 
> org.apache.derby.tools.ij
> ij version 10.7
> ij> connect 
> 'jdbc:derby://localhost:9657/cfgdb;user=username;password=password';
> ij>  CALL SYSCS_UTIL.SYSCS_BACKUP_DATABASE('/home/user/dbbackup');
> ERROR 38000: The exception 'java.security.AccessControlException: Access 
> denied (java.io.FilePermission /home/user/dbbackup write)' was thrown while 
> evaluating an expression.
> ERROR XJ001: Java exception: 'Access denied (java.io.FilePermission 
> /home/user/dbbackup write): java.security.AccessControlException'.
> The directory /home/user/dbbackup doesn't exists. 
> If I create the directory with mkdirs I get then the follow error:
> user@aixx7 578> java -cp "/home/user/lib/derbyrun.jar" 
> org.apache.derby.tools.ij
> ij version 10.7
> ij> connect 
> 'jdbc:derby://localhost:9657/cfgdb;user=username;password=password';
> ij>  CALL SYSCS_UTIL.SYSCS_BACKUP_DATABASE('/home/user/dbbackup');
> ERROR 38000: The exception 'java.lang.NullPointerException' was thrown while 
> evaluating an expression.
> ERROR XJ001: Java exception: ': java.lang.NullPointerException'.
> The server is running:
> user 15073364        1   0 16:11:00  pts/0  0:02 java -Xmx256m -Xms64m 
> -Dderby.system.home=/home/user/cfgdb 
> org.apache.derby.drda.NetworkServerControl start -h 0.0.0.0 -p 9657
> Thanks,
> Marc

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to