Uploaded image for project: 'SDC StreamSets Data Collector'
  1. SDC StreamSets Data Collector
  2. SDC-7278

JDBC Multitable origin throws NPE when the table is empty

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P1 (Blocker)
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0.0, 2.7.1.1
    • Component/s: None
    • Labels:
    • Target Version/s:
    • Doc Impact:
      No
    • Story Points:
      -1
    • Testing Status:
      Not Required
    • Testing Required Description:
      Unit test is sufficient here.
    • Stage:
      JDBC Multitable Consumer origin

      Description

      Probably related to: SDC-7157

      I was able to reproduce in SDC 2.7.1.0 with the offset column set to timestamp, datetime and time type in the database.

      If the offset column is string or int, the pipeline validates. However, it doesn't show any event record (please see print screen from JDBC Multitable origin, and JDBC Query origin where it works).

      2017-09-07 02:22:12,923 [user:*admin] [pipeline:<pipeline_name>93c20cb2-8aae-4e9c-9d68-f3ecce34062a] [runner:] [thread:preview-pool-1-thread-4] WARN  Pipeline - Stage 'JDBCMultitableConsumer_01' initialization error: java.lang.NullPointerException
      java.lang.NullPointerException
      	at com.streamsets.pipeline.lib.jdbc.JdbcUtil.getMinimumOffsetValues(JdbcUtil.java:309)
      	at com.streamsets.pipeline.lib.jdbc.multithread.TableContextUtil.createTableContext(TableContextUtil.java:198)
      	at com.streamsets.pipeline.lib.jdbc.multithread.TableContextUtil.listTablesForConfig(TableContextUtil.java:372)
      	at com.streamsets.pipeline.stage.origin.jdbc.table.TableJdbcSource.checkConnectionAndBootstrap(TableJdbcSource.java:125)
      	at com.streamsets.pipeline.stage.origin.jdbc.table.TableJdbcSource.init(TableJdbcSource.java:259)
      	at com.streamsets.pipeline.api.base.BaseStage.init(BaseStage.java:48)
      	at com.streamsets.pipeline.configurablestage.DStage.init(DStage.java:36)
      	at com.streamsets.datacollector.runner.StageRuntime.init(StageRuntime.java:159)
      	at com.streamsets.datacollector.runner.StagePipe.init(StagePipe.java:101)
      	at com.streamsets.datacollector.runner.StagePipe.init(StagePipe.java:49)
      	at com.streamsets.datacollector.runner.Pipeline.initPipe(Pipeline.java:382)
      	at com.streamsets.datacollector.runner.Pipeline.init(Pipeline.java:295)
      	at com.streamsets.datacollector.runner.Pipeline.validateConfigs(Pipeline.java:205)
      	at com.streamsets.datacollector.runner.preview.PreviewPipeline.validateConfigs(PreviewPipeline.java:60)
      	at com.streamsets.datacollector.execution.preview.sync.SyncPreviewer.validateConfigs(SyncPreviewer.java:133)
      	at com.streamsets.datacollector.execution.preview.async.AsyncPreviewer$1.call(AsyncPreviewer.java:70)
      	at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.lambda$call$0(SafeScheduledExecutorService.java:249)
      	at com.streamsets.datacollector.security.GroupsInScope.execute(GroupsInScope.java:33)
      	at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.call(SafeScheduledExecutorService.java:245)
      	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 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bob bob plotts
                Reporter:
                aneta Aneta Cechova
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: