Ask Your Question
1

Failed to get driver instance with multiple JDBC connections

asked 2019-06-05 14:18:08 -0500

Gautam gravatar image

updated 2019-06-05 16:21:57 -0500

metadaddy gravatar image

This is a weird one I have run into off late. I had a pipeline with multiple stages. The origin was a Oracle CDC, and the processors were JDBC lookups. There were some jython executors too.

Anyways, for some reason, I wanted to change it's origin from oracle CDC to a replicated Mysql bin log. Now, the moment I add the external library and change the origin to MySQL, the validation on the JDBC processors fail MySQL bin log gets validated just fine, but the JDBC lookups all have the following error:

java.lang.RuntimeException: Failed to get driver instance for jdbcUrl=jdbc:oracle:thin:@connection_URL
    at com.zaxxer.hikari.util.DriverDataSource.<init>(DriverDataSource.java:112)
    at com.zaxxer.hikari.pool.PoolBase.initializeDataSource(PoolBase.java:336)
    at com.zaxxer.hikari.pool.PoolBase.<init>(PoolBase.java:109)
    at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:108)
    at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:81)
    at com.streamsets.pipeline.lib.jdbc.JdbcUtil.createDataSourceForRead(JdbcUtil.java:875)
    at com.streamsets.pipeline.stage.processor.jdbclookup.JdbcLookupProcessor.init(JdbcLookupProcessor.java:144)
    at com.streamsets.pipeline.api.base.BaseStage.init(BaseStage.java:48)
    at com.streamsets.pipeline.api.base.configurablestage.DStage.init(DStage.java:36)
    at com.streamsets.datacollector.runner.StageRuntime.lambda$init$0(StageRuntime.java:211)
    at com.streamsets.datacollector.util.LambdaUtil.withClassLoaderInternal(LambdaUtil.java:148)
    at com.streamsets.datacollector.util.LambdaUtil.withClassLoader(LambdaUtil.java:44)
    at com.streamsets.datacollector.runner.StageRuntime.init(StageRuntime.java:209)
    at com.streamsets.datacollector.runner.StagePipe.init(StagePipe.java:106)
    at com.streamsets.datacollector.runner.StagePipe.init(StagePipe.java:43)
    at com.streamsets.datacollector.runner.Pipeline.initPipe(Pipeline.java:403)
    at com.streamsets.datacollector.runner.Pipeline.lambda$init$0(Pipeline.java:392)
    at com.streamsets.datacollector.runner.PipeRunner.acceptConsumer(PipeRunner.java:221)
    at com.streamsets.datacollector.runner.PipeRunner.forEach(PipeRunner.java:175)
    at com.streamsets.datacollector.runner.Pipeline.init(Pipeline.java:389)
    at com.streamsets.datacollector.runner.Pipeline.validateConfigs(Pipeline.java:216)
    at com.streamsets.datacollector.runner.preview.PreviewPipeline.validateConfigs(PreviewPipeline.java:60)
    at com.streamsets.datacollector.execution.preview.sync.SyncPreviewer.validateConfigs(SyncPreviewer.java:158)
    at com.streamsets.datacollector.execution.preview.async.AsyncPreviewer$1.call(AsyncPreviewer.java:76)
    at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.lambda$call$0(SafeScheduledExecutorService.java:226)
    at com.streamsets.datacollector.security.GroupsInScope.execute(GroupsInScope.java:33)
    at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.call(SafeScheduledExecutorService.java:222)
    at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.lambda$call$0(SafeScheduledExecutorService.java:226)
    at com.streamsets.datacollector.security.GroupsInScope.execute(GroupsInScope.java:33)
    at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.call(SafeScheduledExecutorService.java:222)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at com.streamsets.datacollector.metrics.MetricSafeScheduledExecutorService$MetricsTask.run(MetricSafeScheduledExecutorService.java:100)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-06-05 16:26:10 -0500

metadaddy gravatar image

As mentioned in the JDBC troubleshooting docs, the Java Driver Manager sometimes gets confused when you have multiple JDBC drivers available. The fix is to specify the JDBC driver class name in Legacy Drivers / JDBC Driver Class Name. Here is the configuration for the MySQL 8 driver you are using:

image description

edit flag offensive delete link more

Comments

1

yes this worked. Thanks as usual, metadaddy. :)

Gautam gravatar imageGautam ( 2019-06-05 16:35:31 -0500 )edit

Great - can you vote the answer up and accept it please, @Gautam?

metadaddy gravatar imagemetadaddy ( 2019-06-05 19:31:59 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-06-05 14:18:08 -0500

Seen: 135 times

Last updated: Jun 05