Vertica JDBC Issue

Hi,

I am currently trying to connect to Vertica via siren JDBC but i am having trouble getting it to work.

siren version : 10.2.4

Things i have done:

  • Added vertica jdbc driver into the drivers folder
  • Used the same jdbc class, connection string that i use for other application:
    jdbc_driver_class => “com.vertica.jdbc.Driver”
    jdbc_connection_string => "jdbc_connection_string => “jdbc:vertica://10.50.1.50:5433/”

Error Code:
Datasources Configuration Editor: Could not validate datasource [vertica]. {“error”:{“root_cause”:[{“type”:“exception”,“reason”:“Could not validate datasource [vertica].”}],“type”:“exception”,“reason”:“Could not validate datasource [vertica].”,“caused_by”:{“type”:“exception”,“reason”:“Could not execute datasource query.”,“caused_by”:{“type”:“no_class_def_found_error”,“reason”:“Could not initialize class com.vertica.jdbc.Driver”}}},“status”:500}

Appreciate any input and help on the matter.

Hello jansoft,
Just to be sure,I hope you placed the driver jar in: ${your_workspace}/elasticsearch/config/jdbc-drivers (As per docs). If the given node was running while you place the driver, you would need to restart the node. And make sure the class com.vertica.jdbc.Driver does exist in the given jar.
This should sort it out.

Regards,
Varun

Hello varun,

Thank you for the reply,

I tried rebooting the server and restarting the node, but no luck, same error.

I have placed vertica.jar on /elasticsearch/config/jdbc-drivers

I am not sure if the class com.vertica.jdbc.Driver exist in the jar, but i have been using the same jar and driver class on all my other application and they seem to work without much trouble.

Could you provide the error logs generated in elasticsearch?

It also appears that you might need to add a permission for the driver to work properly (After initialization):
permission java.io.FilePermission "vertica.properties", "read";
In two of our security policy files:
drivers-security.policy (Inside grant block for ${codebase.federate.common})
plugin-security.policy

Dear Varun,

Thank you for the reply,

I tried adding “permission java.io.FilePermission “vertica.properties”, “read”;” to drivers-security.policy and plugin-security.policy:
Screenshot_12

And i am getting a new error:

Datasources Configuration Editor: Could not validate datasource [vertica]. {“error”:{“root_cause”:[{“type”:“exception”,“reason”:“Could not validate datasource [vertica].”}],“type”:“exception”,“reason”:“Could not validate datasource [vertica].”,“caused_by”:{“type”:“pool_initialization_exception”,“reason”:“Failed to initialize pool: [Vertica]access denied ("java.io.FilePermission" "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/jre/security/jssecacerts" "read")”,“caused_by”:{“type”:“s_q_l_exception”,“reason”:“[Vertica]access denied ("java.io.FilePermission" "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/jre/security/jssecacerts" "read")”,“caused_by”:{“type”:“access_control_exception”,“reason”:“access denied ("java.io.FilePermission" "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/jre/security/jssecacerts" "read")”}}}},“status”:500}

Elasticsearch.log when i press test connection in siren: