Support Questions

Find answers, ask questions, and share your expertise


New Contributor

Hi All I'm new here.

I'm developing simple stream with JDBC sink to mysql database.
How to register MYSQL(or any other JDBC ) driver in a way that it would be accessible for storm?
I'm getting errors that my driver class name can't be found by Hikari.

*I have installed mysql client and JDBC drivers on all nodes in my cluster.




@gbuchcik Are they errors in storm worker logs? Can you please paste them here? One thing you can try is change your worker.childopts in ambari(if you are using it) to make sure its passed in your classpath so that its available to the worker jvm process.

New Contributor

yes those are errors from storm worker, below you can find example.
I do not use worker.childopts in ambari but I can experiment to change its values ("TOPOLOGY WORKER JVM OPTIONS") while deploying topology from SAM. What do you suggest to put there ?

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at com.zaxxer.hikari.util.PropertyElf.setProperty( at com.zaxxer.hikari.util.PropertyElf.setTargetFromProperties( at com.zaxxer.hikari.HikariConfig.<init>( at org.apache.storm.jdbc.common.HikariCPConnectionProvider.prepare( at org.apache.storm.jdbc.bolt.AbstractJdbcBolt.prepare( at org.apache.storm.jdbc.bolt.JdbcInsertBolt.prepare( at com.hortonworks.streamline.streams.runtime.storm.bolt.jdbc.StreamlineJdbcInsertBolt.prepare( at org.apache.storm.daemon.executor$fn__9866$fn__9879.invoke(executor.clj:794) at org.apache.storm.util$async_loop$fn__555.invoke(util.clj:482) at at Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke( at com.zaxxer.hikari.util.PropertyElf.setProperty( ... 10 more Caused by: java.lang.RuntimeException: Could not load class of driverClassName com.mysql.jdbc.Driver at com.zaxxer.hikari.HikariConfig.setDriverClassName( ... 15 more Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at at java.lang.ClassLoader.loadClass( at sun.misc.Launcher$AppClassLoader.loadClass( at java.lang.ClassLoader.loadClass( at com.zaxxer.hikari.HikariConfig.setDriverClassName(

I have the same issue, trying to connect to a Postgres remote database. I guess the real question is: Where do I put the JDBC jar and how do I specify it in the "Driver Class Name" in the JDBC Sink. Currently, the jar file is located at /usr/hdf/ and the Driver Class Name that I specified is org.postgresql.postgresql.postgresql-9.4.1212. This is obviously wrong, but what is right?

The following Driver Class Names did not work:

  • org.postgresql.Driver
  • /usr/hdf/ (with or without ".jar" extension)
  • postgresql-9.4.1212.jar
  • org.postgresql.postgresql.postgresql-9.4.1212.jar
  • libs.postgresql-9.4.1212.jar