Skip to main content

I have a few JDBC-based stages in my pipeline (Origin, JDBC Lookup, etc.) and when I try to replace the existing JDBC-based origin with another (for example, Oracle CDC with MySQL Binary Log), the validation just on the lookup processors fails with “Failed to get driver instance with multiple JDBC connections” error. Even though I haven’t changed anything on those processors.

Here’s the stack trace…

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 ...

 

How do I resolve this issue?

As mentioned in the JDBC Troubleshooting guide, sometimes the Java Driver Manager does not correctly load JDBC drivers that a pipeline requires if there are multiple JDBC drivers available. Here are two possible resolutions to fix this issue:

  • Specify / add the class name for the driver in the JDBC Class Driver Name property on the Legacy Drivers tab for the stage.
  • Configure Data Collector to automatically load specific drivers. In the Data Collector configuration file, uncomment the stage.conf_com.streamsets.pipeline.stage.jdbc.drivers.load property and set to a comma-separated list of the JDBC drivers required by stages in your pipelines.

Reply