|
@@ -19,6 +19,8 @@ import logging
|
|
|
import os
|
|
import os
|
|
|
import sys
|
|
import sys
|
|
|
|
|
|
|
|
|
|
+from notebook.conf import DBPROXY_EXTRA_CLASSPATH
|
|
|
|
|
+
|
|
|
LOG = logging.getLogger(__name__)
|
|
LOG = logging.getLogger(__name__)
|
|
|
|
|
|
|
|
|
|
|
|
@@ -51,7 +53,11 @@ class Jdbc():
|
|
|
if 'py4j' not in sys.modules:
|
|
if 'py4j' not in sys.modules:
|
|
|
raise Exception('Required py4j module is not imported.')
|
|
raise Exception('Required py4j module is not imported.')
|
|
|
|
|
|
|
|
- self.gateway = JavaGateway.launch_gateway(classpath=os.environ['CLASSPATH'])
|
|
|
|
|
|
|
+ classpath = os.environ.get('CLASSPATH', '')
|
|
|
|
|
+ if DBPROXY_EXTRA_CLASSPATH.get():
|
|
|
|
|
+ classpath = '%s:%s' % (DBPROXY_EXTRA_CLASSPATH.get(), classpath)
|
|
|
|
|
+
|
|
|
|
|
+ self.gateway = JavaGateway.launch_gateway(classpath=classpath)
|
|
|
|
|
|
|
|
self.jdbc_driver = driver_name
|
|
self.jdbc_driver = driver_name
|
|
|
self.db_url = url
|
|
self.db_url = url
|