Skip to content

APIs requires auth dependencies to work correctly #2192

@jabubake

Description

@jabubake

Using only com.google.cloud:google-cloud-errorreporting:0.20-alpha :

java.lang.NoClassDefFoundError: com/google/auth/ServiceAccountSigner
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
	at org.eclipse.jetty.webapp.WebAppClassLoader.findClass(WebAppClassLoader.java:549)
	at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:475)
	at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:428)
	at com.google.api.gax.core.GoogleCredentialsProvider.getCredentials(GoogleCredentialsProvider.java:54)
	at com.google.api.gax.grpc.InstantiatingChannelProvider.createChannel(InstantiatingChannelProvider.java:125)
	at com.google.api.gax.grpc.InstantiatingChannelProvider.getChannel(InstantiatingChannelProvider.java:116)
	at com.google.api.gax.grpc.ChannelAndExecutor.create(ChannelAndExecutor.java:65)
	at com.google.api.gax.grpc.ClientSettings.getChannelAndExecutor(ClientSettings.java:91)
	at com.google.cloud.errorreporting.v1beta1.ReportErrorsServiceClient.<init>(ReportErrorsServiceClient.java:122)

Current workaround is to include :

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.google.auth</groupId>
        <artifactId>google-auth-library-credentials</artifactId>
        <version>0.6.1</version>
      </dependency>
      <dependency>
        <groupId>com.google.auth</groupId>
        <artifactId>google-auth-library-oauth2-http</artifactId>
        <version>0.6.1</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

Metadata

Metadata

Labels

api: clouderrorreportingIssues related to the Error Reporting API.api: dlpIssues related to the Sensitive Data Protection API.api: languageIssues related to the Cloud Natural Language API API.api: monitoringIssues related to the Cloud Monitoring API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions