FoundationDB/sql-layer — pull request #1543 by SytzeH (2014-11-20 16:41:37+00:00)
Title: Add context ClassLoader maintenance for stored procedures

Added context ClassLoader such that routines only see the JAVA JRE classes. Routines will not be able to see classes from the SQL Layer related classes. For the moment this also implies JDBC is disfunctional in routines.

Calls trying to access classes (existing or non-existing) result in: ERROR: Error invoking `sytze`.`test_handleb`: javax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: TypeError: Cannot call property selectAPIVersion in object [JavaPackage com.foundationdb.FDB]. It is not a function, it is "object". (sytze.test_handleb#3) in sytze.test_handleb at line number 3

Calls with jdbc usage fail with an unhandled exception: java.lang.NoClassDefFoundError

Existing 'system' routines return a ClassNotFound Exception when called: PostgresServerConnection - Error in query CALL sqlj.install_jar('a','a',1) => com.foundationdb.server.error.SQLJInstanceException: SQLJ_INSTANCE_EXCEPTION: Problem loading `sqlj`.`install_jar`: java.lang.ClassNotFoundException: com.foundationdb.server.service.routines.SQLJJarRoutines

The last two issues should be resolved with follow up actions.