GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Problem with google-cloud-logging. NoSuchMethodError · Issue #1857 · googleapis/google-cloud-java

Problem with google-cloud-logging. NoSuchMethodError #1857

New issue
Copy link
New issue
Copy link
Closed
Closed
Problem with google-cloud-logging. NoSuchMethodError#1857
Copy link
Assignees
garrettjonesgoogle
Labels
api: loggingIssues related to the Cloud Logging API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@joelostlund
joelostlund
opened on Apr 4, 2017
Issue body actions

Hello,

I have the following issue with google-cloud-logging:

I am trying to run the following code-snippet:

package com.spotify.katamari

import java.util.Collections

import com.google.cloud.MonitoredResource
import com.google.cloud.logging.Payload.StringPayload
import com.google.cloud.logging.{LogEntry, LoggingOptions}

object Logging {
  def sendValueToStackdriver(userCount: Long, date: String, pipelineId: String): Unit = {
    val logging = LoggingOptions.newBuilder().setProjectId("entity-infrastructure").build().getService
    val firstEntry: LogEntry = LogEntry.newBuilder(StringPayload.of(s"UserCounter from $pipelineId"))
      .setLogName(s"UserCounter")
      .setResource(MonitoredResource.newBuilder("global")
        .addLabel("value", userCount.toString)
        .addLabel("date", date)
        .addLabel("pipeline-id", pipelineId)
        .build())
      .build()
    logging.write(Collections.singleton(firstEntry))
  }
}

After running I get the following stacktrace:

[error] Exception in thread "main" java.lang.NoSuchMethodError: io.grpc.protobuf.ProtoUtils.marshaller(Lcom/google/protobuf/Message;)Lio/grpc/MethodDescriptor$Marshaller;
[error] 	at com.google.logging.v2.ConfigServiceV2Grpc.<clinit>(ConfigServiceV2Grpc.java:41)
[error] 	at com.google.cloud.logging.spi.v2.ConfigSettings$Builder.<init>(ConfigSettings.java:306)
[error] 	at com.google.cloud.logging.spi.v2.ConfigSettings$Builder.createDefault(ConfigSettings.java:328)
[error] 	at com.google.cloud.logging.spi.v2.ConfigSettings$Builder.access$000(ConfigSettings.java:259)
[error] 	at com.google.cloud.logging.spi.v2.ConfigSettings.defaultBuilder(ConfigSettings.java:186)
[error] 	at com.google.cloud.logging.spi.v2.GrpcLoggingRpc.<init>(GrpcLoggingRpc.java:102)
[error] 	at com.google.cloud.logging.LoggingOptions$DefaultLoggingRpcFactory.create(LoggingOptions.java:64)
[error] 	at com.google.cloud.logging.LoggingOptions$DefaultLoggingRpcFactory.create(LoggingOptions.java:58)
[error] 	at com.google.cloud.ServiceOptions.getRpc(ServiceOptions.java:460)
[error] 	at com.google.cloud.logging.LoggingOptions.getLoggingRpcV2(LoggingOptions.java:133)
[error] 	at com.google.cloud.logging.LoggingImpl.<init>(LoggingImpl.java:96)
[error] 	at com.google.cloud.logging.LoggingOptions$DefaultLoggingFactory.create(LoggingOptions.java:46)
[error] 	at com.google.cloud.logging.LoggingOptions$DefaultLoggingFactory.create(LoggingOptions.java:41)
[error] 	at com.google.cloud.ServiceOptions.getService(ServiceOptions.java:451)
[error] 	at com.spotify.katamari.Logging$.sendValueToStackdriver(Logging.scala:11)
[error] 	at com.spotify.katamari.entity.EntityAPI$.write(EntityAPI.scala:72)
[error] 	at ExampleProducer$.main(ExampleProducer.scala:19)
[error] 	at ExampleProducer.main(ExampleProducer.scala)
java.lang.RuntimeException: Nonzero exit code returned from runner: 1
	at scala.sys.package$.error(package.scala:27)
[trace] Stack trace suppressed: run last e2e/compile:runMain for the full output.
[error] (e2e/compile:runMain) Nonzero exit code returned from runner: 1
[error] Total time: 314 s, completed Apr 4, 2017 4:17:40 PM

I have made sure to isolate all the dependencies for this logger by putting the snippet code into a separate repository, it still doesn't work. Seems to be some dependency issues with the code. I am using the following library:

"com.google.cloud" % "google-cloud-logging" % "0.11.0-beta" and have also tried to downgrade it, still facing the same issue.

Activity

  1. lanxxnal commented on Apr 10, 2017

    @lanxxnal
    lanxxnal
    on Apr 10, 2017
    More actions

    I'm experiencing the same errors when trying to write custom logs to our stackdriver. I tried previous versions and it is not working for me as well.

  2. fallonchen commented on Apr 12, 2017

    @fallonchen
    fallonchen
    on Apr 12, 2017
    More actions

    I am also experiencing these errors.

  3. garrettjonesgoogle commented on Apr 12, 2017

    @garrettjonesgoogle
    garrettjonesgoogle
    on Apr 12, 2017
    Contributor
    More actions

    @joelostlund what version of grpc are you using?

  4. joelostlund commented on Apr 12, 2017

    @joelostlund
    joelostlund
    on Apr 12, 2017
    Author
    More actions

    @garrettjonesgoogle the same as specified in the ${grpc.version} in the pom.xml

  5. garrettjonesgoogle
    added
    api: loggingIssues related to the Cloud Logging API.
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Apr 12, 2017
  6. garrettjonesgoogle commented on May 30, 2017

    @garrettjonesgoogle
    garrettjonesgoogle
    on May 30, 2017
    Contributor
    More actions

    @joelostlund can you have your build tool tell you exactly which version you are pulling in for grpc-protobuf? The missing method has been present since before grpc-protobuf:1.0.0.

  7. garrettjonesgoogle
    added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on May 30, 2017
  8. garrettjonesgoogle commented on Jul 18, 2017

    @garrettjonesgoogle
    garrettjonesgoogle
    on Jul 18, 2017
    Contributor
    More actions

    No response, so I'm going to close this out. Feel free to re-open if you can provide more information.

  9. garrettjonesgoogle
    closed this as completedon Jul 18, 2017
  10. JustinBeckwith
    assigned
    garrettjonesgoogle
    on Feb 1, 2021
  11. suztomo
    added 2 commits that reference this issue on Mar 23, 2026

    deps: update dependency com.google.cloud:sdk-platform-java-config to …

    ca02222

    chore(main): release 2.25.1 (googleapis#1858)

    7ee518e
  12. meltsufin
    added 7 commits that reference this issue on Apr 29, 2026

    deps: update dependency com.google.cloud:google-cloud-storage to v2.3…

    d673e55

    chore(main): release 1.126.1 (#1871)

    daaf9e3

    chore(main): release 1.133.0 (#2206)

    a3b6539

    deps: update dependency com.google.cloud:google-cloud-storage to v2.3…

    81cd1f1

    chore(main): release 1.126.1 (#1871)

    a83d9dc

    chore(main): release 1.133.0 (#2206)

    1180af9

    chore(deps): update dependency com.google.cloud:google-cloud-firestor…

    869ccd6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @garrettjonesgoogle
    garrettjonesgoogle

Labels

api: loggingIssues related to the Cloud Logging API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.