Re: Security problem with ggregate functions using Java

2017-02-20 Thread nicholas walton
Rick, Concur with the ij problem, I was caught out by the ij script using DERBY_OPTS and picking up the security policy which left it with no permissions. Easy fix. As for Derby version I’ve upgraded to Apache Derby Network Server - 10.13.1.1 and that partly fixed things, since before doing

Re: Security problem with ggregate functions using Java

2017-02-20 Thread Rick Hillegas
Hi Nicholas, I think that the ij permissions problem is a red herring. That problem arises because ij is trying to call System.getProperties() but the security policy does not grant property-reading privilege to derbytools.jar. Concerning your original problem: What strikes me as significant

Re: Security problem with ggregate functions using Java

2017-02-20 Thread Bryan Pendleton
Hello Nick, The ij code is in derbytools.jar, I believe. Did you define a security policy that covers derbytools.jar? In particular, to allow calling System.getProperties, try something like: grant codeBase "${derbyTesting.codejar}derbytools.jar" { // Access all properties using

Re: Security problem with ggregate functions using Java

2017-02-20 Thread nicholas walton
Rick, Neither Netbeans nor ij dumped the stack, I’m afraid. The full message is Error code 3, SQL state 38000: The exception 'java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.reflect")' was thrown while evaluating an

Re: Security problem with ggregate functions using Java

2017-02-19 Thread Rick Hillegas
Thanks for raising this issue, Nicholas. Can you include the full stack trace for the error? The template policy may need to grant some additional privilege to the engine jar file. It is also possible that you have run into the following defect: https://issues.apache.org/jira/browse/DERBY-4354

Re: Security problem with ggregate functions using Java

2017-02-17 Thread toma.george89
Hi Nicholas, I think that your issue is due to java policy ( either you need to change your Java policy file, or if you supply any do your derby context, update this one ). Please check https://docs.oracle.com/cd/E19225-01/820-5594/ahtbo/index.html, and this

Security problem with ggregate functions using Java

2017-02-17 Thread nicholas walton
Hi, I need to extend Java’s aggregate functions to include Median, using the code below import java.util.ArrayList; import java.util.Collections; import org.apache.derby.agg.Aggregator; public class median> implements Aggregator { private ArrayList _values; public