I am finally rebooting an old plugin that supports database access within
Elasticsearch to 5.x. Was able to quickly get around the new plugin
infrastructure, but I am failing to get past the new security features.
Using a JDBC4 driver, the DriverManager is not able to find a registered
java.sql.SQLException: No suitable driver found for
This scenario is common if the app container does not support dynamically
loading drivers via the ServiceLoader. The plugin class loader must not
execute this step. No problem, I will just revert to the old
Class.forName() hack. That attempts results in another exception:
java.security.AccessControlException: access denied
What can be done to load a database driver? I was going to cleanup some of
this code by using DataSources (via an apache commons wrapper), but I
suspect it will also get stuck by security features. This plugin is generic
and the actual database driver is lazy loaded.