Closed yunus89 closed 6 years ago
You have this stack trace:
Caused by: java.lang.NoClassDefFoundError: com/google/api/services/cloudresourcemanager/CloudResourceManager$Builder
at org.apache.beam.sdk.extensions.gcp.options.GcpOptions$GcpTempLocationFactory.newCloudResourceManagerClient(GcpOptions.java:369)
at org.apache.beam.sdk.extensions.gcp.options.GcpOptions$GcpTempLocationFactory.create(GcpOptions.java:240)
at org.apache.beam.sdk.extensions.gcp.options.GcpOptions$GcpTempLocationFactory.cre
And according your dependencies you have this:
org.apache.beam:beam-runners-google-cloud-dataflow-java:jar:2.2.0:compile
[INFO] | +- org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:jar:2.2.0:compile
[INFO] | | +- com.google.cloud.bigdataoss:gcsio:jar:1.4.5:compile
[INFO] | | \- com.google.apis:google-api-services-cloudresourcemanager:jar:v1beta1-rev10-1.21.0:compile
So, technically you have everything to make it work, but looks like there is some versions incompatibility.
This project doesn’t provide (yet) any DataFlow Integration . Please consider to move your question to Apache Beam project. Or really prove that exactly this Spring Cloud GCP causes the problem and point us, please, what is wrong.
Thank you for understanding
Apache Beam project has no Issues tab/new Issue area at Github, if there is anyone able to help, i will appreciate.
There is Contact Us in their README: https://github.com/apache/beam/blob/master/README.md#contact-us and clear link to JIRA in that section:
Report issues on JIRA.
Note the same post on StackOverflow.
Try the latest version of the GCP beam runner that was released on Feb 10.
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-runners-google-cloud-dataflow-java</artifactId>
<version>2.3.0</version>
</dependency>
I added this
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-core</artifactId>
<version>1.9.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
<version>1.9.0</version>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-runners-google-cloud-dataflow-java</artifactId>
<version>2.3.0</version>
<exclusions>
<exclusion>
<groupId>io.grpc</groupId>
<artifactId>grpc-core</artifactId>
</exclusion>
<exclusion>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
</exclusion>
</exclusions>
</dependency>
Still the same exception is thrown
The reason you're seeing CloudResourceManager
not found is because of the conflicting version of com.google.apis:google-api-services-cloudresourcemanager
dependency. I see two versions of it in play v1beta1-rev10-1.21.0
and v1-rev6-1.22.0
. The older version has the class Cloudresourcemanager
and the newer version has CloudResourceManager
.
beam-runners-google-cloud-dataflow-java
really needs the newer version. However, the older version is being managed by the Google Cloud Java Libraries BOM com.google.cloud:google-cloud-bom
,
which Spring Cloud GCP BOM uses. I will file an issue against Google Cloud Java Libraries, but in the meantime simply add the newer google-api-services-cloudresourcemanager
to your POM.
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-cloudresourcemanager</artifactId>
<version>v1-rev6-1.22.0</version>
</dependency>
Please reopen if still an issue.
In a spring boot application running google cloud dataflow code. The dataflow takes data from google PubSub, transform incoming data and output result to bigquery for storage. The code does not have any syntax errors. The problem is when the application is run, the following exception is thrown.
Maven dependency tree: