Ask Your Question
1

initialization error: java.lang.NullPointerException (Google Cloud Storage Destination)

asked 2019-08-14 05:06:11 -0600

adamgtyson gravatar image

updated 2019-08-14 12:06:35 -0600

metadaddy gravatar image

Hello,

Absolute beginner so apologies if this is a very elementary issue.

I'm trying to set up a Google Cloud Storage destination (the origin is Salesforce) and I've hit the above error, and couldn't turn up a similar issue/solution with Google. I'm running SDC on ubuntu-18.04.3 on a virtual machine. The Salesforce origin appears to be configured correctly (originally it threw some errors but I corrected those and this is now the only error I get when I try to start my pipeline.)

Copy/paste from my log is below - I'd really appreciate any help.

2019-08-14 08:17:21,400     SFDC Test 1/SFDCTest1f272bd41-3cf6-4465-bcb0-7f8c058bc0f3   INFO    Starting housekeeper thread for expected types cache (runs every 5mins)     LruExpressionEvaluatorImpl  admin       EL-cache-trimmer
2019-08-14 08:18:34,631     SFDC Test 1/SFDCTest1f272bd41-3cf6-4465-bcb0-7f8c058bc0f3   INFO    Preparing to start pipeline 'SFDCTest1f272bd41-3cf6-4465-bcb0-7f8c058bc0f3::0'  StandaloneRunner    admin       webserver-22
2019-08-14 08:18:34,717     SFDC Test 1/SFDCTest1f272bd41-3cf6-4465-bcb0-7f8c058bc0f3   INFO    Starting pipeline SFDCTest1f272bd41-3cf6-4465-bcb0-7f8c058bc0f3 0   StandaloneRunner    *admin      runner-pool-2-thread-9
2019-08-14 08:18:35,244     SFDC Test 1/SFDCTest1f272bd41-3cf6-4465-bcb0-7f8c058bc0f3   INFO    Adding error listeners0     ProductionPipelineRunner    *admin      runner-pool-2-thread-9
2019-08-14 08:18:35,686     SFDC Test 1/SFDCTest1f272bd41-3cf6-4465-bcb0-7f8c058bc0f3   INFO    Processing lifecycle start event with stage     Pipeline    *admin      ProductionPipelineRunnable-SFDCTest1f272bd41-3cf6-4465-bcb0-7f8c058bc0f3-SFDC Test 1
2019-08-14 08:18:37,943     SFDC Test 1/SFDCTest1f272bd41-3cf6-4465-bcb0-7f8c058bc0f3   INFO    Successfully authenticated as ClearCredentialValue{}    ForceSource     *admin      ProductionPipelineRunnable-SFDCTest1f272bd41-3cf6-4465-bcb0-7f8c058bc0f3-SFDC Test 1
2019-08-14 08:18:37,956     SFDC Test 1/SFDCTest1f272bd41-3cf6-4465-bcb0-7f8c058bc0f3   INFO    Found sobject type account  ForceSource     *admin      ProductionPipelineRunnable-SFDCTest1f272bd41-3cf6-4465-bcb0-7f8c058bc0f3-SFDC Test 1
2019-08-14 08:18:38,108     SFDC Test 1/SFDCTest1f272bd41-3cf6-4465-bcb0-7f8c058bc0f3   ERROR   Credentials file '/home/atyson/Documents/streamsets-datacollector-all-3.10.0/streamsets-datacollector-3.10.0/resources/~/Documents/streamsets-datacollector-all-3.10.0/streamsets-datacollector-3.10.0/resources/key.json' not found    GoogleCloudCredentialsConfig    *admin  0   ProductionPipelineRunnable-SFDCTest1f272bd41-3cf6-4465-bcb0-7f8c058bc0f3-SFDC Test 1
2019-08-14 08:18:38,247     SFDC Test 1/SFDCTest1f272bd41-3cf6-4465-bcb0-7f8c058bc0f3   WARN    Stage 'GoogleCloudStorage_02' initialization error: java.lang.NullPointerException  Pipeline    *admin  0   ProductionPipelineRunnable-SFDCTest1f272bd41-3cf6-4465-bcb0-7f8c058bc0f3-SFDC Test 1
java.lang.NullPointerException
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:770)
    at com.google.cloud.ServiceOptions$Builder.setCredentials(ServiceOptions.java:206)
    at com.streamsets.pipeline.stage.cloudstorage.destination.GoogleCloudStorageTarget.init(GoogleCloudStorageTarget.java:103)
    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:220)
    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:218)
    at com.streamsets.datacollector.runner.StagePipe.init(StagePipe.java:107)
    at com.streamsets.datacollector.runner.StagePipe.init(StagePipe.java:44)
    at com.streamsets.datacollector.runner.Pipeline.initPipe(Pipeline.java:409)
    at com.streamsets.datacollector.runner.Pipeline.lambda$init$0(Pipeline.java:398)
    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:395)
    at com.streamsets.datacollector.execution.runner.common.ProductionPipeline.run(ProductionPipeline.java:96)
    at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunnable.run(ProductionPipelineRunnable.java:75)
    at com.streamsets.datacollector ...
(more)
edit retag flag offensive close merge delete

Comments

Is there another stack trace immediately after that one, prefixed by "caused by"?

metadaddy gravatar imagemetadaddy ( 2019-08-14 09:54:14 -0600 )edit
1

Thanks for the reply. I ran the process again to be sure, but nothing prefixed with "caused by" appears in the log. I did notice however that I didn't paste the log from the entire attempt...I didn't pay enough attention to the timestamps. I've edited my question with my most recent log.

adamgtyson gravatar imageadamgtyson ( 2019-08-14 10:25:20 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-08-14 12:15:28 -0600

metadaddy gravatar image

The relevant section of the error trace is

Credentials file '/home/atyson/Documents/streamsets-datacollector-all-3.10.0/streamsets-datacollector-3.10.0/resources/~/Documents/streamsets-datacollector-all-3.10.0/streamsets-datacollector-3.10.0/resources/key.json' not found

The docs for Credentials File Path say:

Enter a path relative to the Data Collector resources directory, $SDC_RESOURCES, or enter an absolute path.

It looks like you set Credentials File Path to ~/Documents/streamsets-datacollector-all-3.10.0/streamsets-datacollector-3.10.0/resources/key.json; this is being interpreted as a relative path since it doesn't start with /. If you set Credentials File Path to just key.json, it should work.

edit flag offensive delete link more

Comments

1

This solved it immediately, thank you very much for taking the time!

adamgtyson gravatar imageadamgtyson ( 2019-08-14 16:19:40 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-08-14 05:06:11 -0600

Seen: 43 times

Last updated: Aug 14