db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spykee <toma.georg...@yahoo.com>
Subject Re: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "getClassLoader")
Date Tue, 22 Jul 2014 19:21:14 GMT
Hi Rick,

I tried to start it from the console & Netbeans, but I encountered the same
errors ( I downloaded the latest Apache Derby, *10.10.2.0* - I'm using*
Windows 8.1* ).

What I did was :

1. Go on Apache Website and download the latest bin version.
2. Execute startNetworkServer.bat from the /bin directory.
3. Execute these with success( I tried both ways : using ij from console and
Netbeans directly, but same errors):
* CALL
sqlj.install_jar('C:\\rlibraryStoredProcedures.jar','APP.rlibraryStoredProcedures',0);  
* CALL
SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.database.classpath','APP.rlibraryStoredProcedures');

* CREATE PROCEDURE deltaCollectorInsert(IN deltaColumn varchar(25),IN val1
VARCHAR(5000), IN val2 varchar(5000),IN tableName varchar(25),
 IN tableCode varchar(25),IN pkColumn varchar(25), IN pkValue INT)
LANGUAGE JAVA 
PARAMETER STYLE JAVA  
EXTERNAL NAME'com.rlibary.storedproc.DeltaCollector.deltaCollectorInsert';

4. Make a call to the stored procedure:
* CALL
deltaCollectorInsert('book','val1','val1','table','tableCode','pkColumn',1);

Observe the errors from the attached file (derby_errors.txt)
derby_errors.txt
<http://apache-database.10148.n7.nabble.com/file/n140909/derby_errors.txt> 
:


See also the attached Java class with the stored procedure:
*  DeltaCollector.java
<http://apache-database.10148.n7.nabble.com/file/n140909/DeltaCollector.java>  

See my java.policy file from my JRE ( Java 8.0) in case this is important:
*  java.policy
<http://apache-database.10148.n7.nabble.com/file/n140909/java.policy>  

Even with those errors my stored procedure is executed ( I ran it directly
from console in order to insert rows in a single table), but I encountered a
problem when using transaction between 2 tables.
* I have an UPDATE trigger on table t1 which calls my mentioned stored
procedure( which will insert a row in table2, @see my attached Java class).
When I try to make an update, I encounter this.
******************************
Error code 20000, SQL state 38000
Update command failed: The exception 'java.sql.SQLException: Cannot issue
rollback in a nested connection when there is a pending operation in the
parent connection.' was thrown while evaluating an expression.
*****************************

Can you please help me with this ? 

Cheers,
George



--
View this message in context: http://apache-database.10148.n7.nabble.com/java-security-AccessControlException-access-denied-java-lang-RuntimePermission-getClassLoader-tp140900p140909.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

Mime
View raw message