missing jdbc driver error message in distributed mode

881 views
Skip to first unread message

Eugene Dvorkin

unread,
Mar 20, 2013, 9:49:02 AM3/20/13
to storm...@googlegroups.com
One of my bolt should record data into SQL datastore. The application works fine in local mode. 
When I deploy it into cluster, even my cluster consist only on one server, I got 2013-03-20 09:39:33 STDIO [ERROR] java.sql.SQLException: No suitable driver found for jdbc:vertica:

I see error in worker log file.

My jar file contains all driver classes. I have verified it with 
 jar -tf build/libs/CPStorm-9.4.0.jar |grep vertica

and I got:
com/vertica/jdbc/
com/vertica/jdbc/AbstractDataSource.class
com/vertica/jdbc/AbstractDriver.class
com/vertica/jdbc/BaseConnectionFactory.class
com/vertica/jdbc/DataSource.class
com/vertica/jdbc/Driver.class
com/vertica/jdbc/JDBCObjectFactory.class
com/vertica/jdbc/SCallableStatement.class
com/vertica/jdbc/SConnection.class
and a lot of other classes.

What could be the reason for this error? 
Maybe driver was not transferred to the worker?

Thanks




Eugene Dvorkin

unread,
Mar 20, 2013, 12:14:36 PM3/20/13
to storm...@googlegroups.com
Was my own problem:
I had to explicitly load jdbc driver before attempting to connect

log.info( 'try to load the vertica JDBC driver')
            Class.forName("com.vertica.jdbc.Driver");
            log.info("loaded vertica driver")

This is the difference from my local mode
Reply all
Reply to author
Forward
0 new messages