{"action":"closed","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/2175","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/2175/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/2175/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/2175/events","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-java/issues/2175","id":237723857,"number":2175,"title":"Unable to use google-cloud-pubsub with google dataflow","user":{"login":"seehans","id":18466989,"avatar_url":"https://avatars1.githubusercontent.com/u/18466989?v=3","gravatar_id":"","url":"https://api.github.com/users/seehans","html_url":"https://github.com/seehans","followers_url":"https://api.github.com/users/seehans/followers","following_url":"https://api.github.com/users/seehans/following{/other_user}","gists_url":"https://api.github.com/users/seehans/gists{/gist_id}","starred_url":"https://api.github.com/users/seehans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seehans/subscriptions","organizations_url":"https://api.github.com/users/seehans/orgs","repos_url":"https://api.github.com/users/seehans/repos","events_url":"https://api.github.com/users/seehans/events{/privacy}","received_events_url":"https://api.github.com/users/seehans/received_events","type":"User","site_admin":false},"labels":[{"id":175662347,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/labels/API:%20pubsub","name":"API: pubsub","color":"cd7f32","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-06-22T03:41:15Z","updated_at":"2017-06-22T15:58:54Z","closed_at":"2017-06-22T15:58:54Z","body":"I am trying to initialize Pulisher using following snippet in dataflow code:\r\n```\r\nPublisher\r\n  .defaultBuilder(topicName)\r\n  .setChannelProvider(TopicAdminSettings\r\n    .defaultChannelProviderBuilder()\r\n    .setCredentialsProvider(FixedCredentialsProvider.create(credentials))\r\n    .build())\r\n  .build();\r\n```\r\nI am getting exception:  \"java.lang.RuntimeException: java.lang.NoClassDefFoundError: Could not initialize class com.google.cloud.pubsub.v1.TopicAdminSettings\r\n\r\nStacktrace:\r\n`\r\nexception:  \"java.lang.RuntimeException: java.lang.NoClassDefFoundError: Could not initialize class com.google.cloud.pubsub.v1.TopicAdminSettings\r\n\tat com.google.cloud.dataflow.sdk.runners.worker.SimpleParDoFn$1.output(SimpleParDoFn.java:162)\r\n\tat com.google.cloud.dataflow.sdk.util.DoFnRunnerBase$DoFnContext.outputWindowedValue(DoFnRunnerBase.java:288)\r\n\tat com.google.cloud.dataflow.sdk.util.DoFnRunnerBase$DoFnProcessContext.output(DoFnRunnerBase.java:450)\r\n\tat com.FileNameParser$BucketFileNameParser.processElement(FileNameParser.java:93)\r\nCaused by: java.lang.NoClassDefFoundError: Could not initialize class com.google.cloud.pubsub.v1.TopicAdminSettings\r\n\tat com.google.cloud.pubsub.v1.Publisher$Builder.<init>(Publisher.java:579)\r\n\tat com.google.cloud.pubsub.v1.Publisher$Builder.<init>(Publisher.java:528)\r\n\tat com.google.cloud.pubsub.v1.Publisher.defaultBuilder(Publisher.java:524)\r\n\tat com.ReadFile$ReadBucketFile.createPublisherWithCustomCredentials(ReadFile.java:176)\r\n\tat com.ReadFile$ReadBucketFile.publishMessage(ReadFile.java:144)\r\n\tat com.ReadFile$ReadBucketFile.processElement(ReadFile.java:118)\r\n\tat com.google.cloud.dataflow.sdk.util.SimpleDoFnRunner.invokeProcessElement(SimpleDoFnRunner.java:49)\r\n\tat com.google.cloud.dataflow.sdk.util.DoFnRunnerBase.processElement(DoFnRunnerBase.java:139)\r\n\tat com.google.cloud.dataflow.sdk.runners.worker.SimpleParDoFn.processElement(SimpleParDoFn.java:190)\r\n\tat com.google.cloud.dataflow.sdk.runners.worker.ForwardingParDoFn.processElement(ForwardingParDoFn.java:42)\r\n\tat com.google.cloud.dataflow.sdk.runners.worker.DataflowWorkerLoggingParDoFn.processElement(DataflowWorkerLoggingParDoFn.java:47)\r\n\tat com.google.cloud.dataflow.sdk.util.common.worker.ParDoOperation.process(ParDoOperation.java:55)\r\n\tat com.google.cloud.dataflow.sdk.util.common.worker.OutputReceiver.process(OutputReceiver.java:52)\r\n\tat com.google.cloud.dataflow.sdk.runners.worker.SimpleParDoFn$1.output(SimpleParDoFn.java:160)\r\n\tat com.google.cloud.dataflow.sdk.util.DoFnRunnerBase$DoFnContext.outputWindowedValue(DoFnRunnerBase.java:288)\r\n\tat com.google.cloud.dataflow.sdk.util.DoFnRunnerBase$DoFnProcessContext.output(DoFnRunnerBase.java:450)\r\n\tat com.FileNameParser$BucketFileNameParser.processElement(FileNameParser.java:93)\r\n\tat com.google.cloud.dataflow.sdk.util.SimpleDoFnRunner.invokeProcessElement(SimpleDoFnRunner.java:49)\r\n\tat com.google.cloud.dataflow.sdk.util.DoFnRunnerBase.processElement(DoFnRunnerBase.java:139)\r\n\tat com.google.cloud.dataflow.sdk.runners.worker.SimpleParDoFn.processElement(SimpleParDoFn.java:190)\r\n\tat com.google.cloud.dataflow.sdk.runners.worker.ForwardingParDoFn.processElement(ForwardingParDoFn.java:42)\r\n\tat com.google.cloud.dataflow.sdk.runners.worker.DataflowWorkerLoggingParDoFn.processElement(DataflowWorkerLoggingParDoFn.java:47)\r\n\tat com.google.cloud.dataflow.sdk.util.common.worker.ParDoOperation.process(ParDoOperation.java:55)\r\n\tat com.google.cloud.dataflow.sdk.util.common.worker.OutputReceiver.process(OutputReceiver.java:52)\r\n\tat com.google.cloud.dataflow.sdk.util.common.worker.ReadOperation.runReadLoop(ReadOperation.java:224)\r\n\tat com.google.cloud.dataflow.sdk.util.common.worker.ReadOperation.start(ReadOperation.java:185)\r\n\tat com.google.cloud.dataflow.sdk.util.common.worker.MapTaskExecutor.execute(MapTaskExecutor.java:72)\r\n\tat com.google.cloud.dataflow.sdk.runners.worker.StreamingDataflowWorker.process(StreamingDataflowWorker.java:710)\r\n\tat com.google.cloud.dataflow.sdk.runners.worker.StreamingDataflowWorker.access$500(StreamingDataflowWorker.java:99)\r\n\tat com.google.cloud.dataflow.sdk.runners.worker.StreamingDataflowWorker$8.run(StreamingDataflowWorker.java:799)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n`"}}
{"actor":{"display_login":"seehans"}}