question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

exporter/stats/StackdriverExporter: Exception thrown when creating MetricDescriptor. java.lang.NoSuchMethodError: com.google.common.base.Throwables.throwIfInstanceOf(Ljava/lang/Throwable;Ljava/lang/Class;)V

See original GitHub issue

When running a demo after instrumenting a Redis Java client https://gist.github.com/odeke-em/69f750885095ce50cbc409a2386495d9 with the diff at https://github.com/orijtech/jedis/pull/1 (in case you’d like to inspect the metrics or reproduce), I get back this crash in my server

May 30, 2018 2:35:26 PM io.opencensus.exporter.stats.stackdriver.StackdriverExporterWorker registerView
WARNING: Exception thrown when creating MetricDescriptor.
java.lang.NoSuchMethodError: com.google.common.base.Throwables.throwIfInstanceOf(Ljava/lang/Throwable;Ljava/lang/Class;)V
	at com.google.api.gax.rpc.ApiExceptions.callAndTranslateApiException(ApiExceptions.java:54)
	at com.google.api.gax.rpc.UnaryCallable.call(UnaryCallable.java:112)
	at com.google.cloud.monitoring.v3.MetricServiceClient.createMetricDescriptor(MetricServiceClient.java:747)
	at io.opencensus.exporter.stats.stackdriver.StackdriverExporterWorker.registerView(StackdriverExporterWorker.java:134)
	at io.opencensus.exporter.stats.stackdriver.StackdriverExporterWorker.export(StackdriverExporterWorker.java:161)
	at io.opencensus.exporter.stats.stackdriver.StackdriverExporterWorker.run(StackdriverExporterWorker.java:209)
	at java.base/java.lang.Thread.run(Thread.java:844)

May 30, 2018 2:35:39 PM io.opencensus.exporter.stats.stackdriver.StackdriverExporterWorker export
WARNING: Exception thrown when exporting TimeSeries.
java.lang.NoSuchMethodError: com.google.common.base.Throwables.throwIfInstanceOf(Ljava/lang/Throwable;Ljava/lang/Class;)V
	at com.google.api.gax.rpc.ApiExceptions.callAndTranslateApiException(ApiExceptions.java:54)
	at com.google.api.gax.rpc.UnaryCallable.call(UnaryCallable.java:112)
	at com.google.cloud.monitoring.v3.MetricServiceClient.createTimeSeries(MetricServiceClient.java:1157)
	at io.opencensus.exporter.stats.stackdriver.StackdriverExporterWorker.export(StackdriverExporterWorker.java:182)
	at io.opencensus.exporter.stats.stackdriver.StackdriverExporterWorker.run(StackdriverExporterWorker.java:209)
	at java.base/java.lang.Thread.run(Thread.java:844)

Regardless of the metrics from userland, I believe that we shouldn’t have a crash in the exporter

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
sebrightcommented, May 31, 2018

I think that issue #1117 would also solve this problem by allowing users to force consistent versions of opencensus-java’s dependencies.

1reaction
odeke-emcommented, May 30, 2018

Sure, please add the following lines to the dependencies in your pom.xml file:

Great, thank you @songy23! Houston we have touchdown – it works great now! screen shot 2018-05-30 at 3 52 29 pm

Read more comments on GitHub >

github_iconTop Results From Across the Web

I upgraded my appium java client from 4.1.2 to 6.1.0 ... - GitHub
0- java.lang.NoSuchMethodError: com.google.common.base.Throwables.throwIfUnchecked(Ljava/lang/Throwable;)V #1231.
Read more >
java.lang.NoSuchMethodError when running Appium Test
I'm getting java.lang.NoSuchMethodError on my appium tests. The same tests have been running but left for a while and not running anymore ....
Read more >
Throwables (Guava: Google Core Libraries for Java 23.0 API)
Use throw e or throw new RuntimeException(e) directly, or use a combination of throwIfUnchecked(java.lang.Throwable) and throw new RuntimeException(e) .
Read more >
com.google.common.base.Throwables.throwIfUnchecked java ...
Returns the most concrete public methods from {@code type}. */ private static Method[] getMostConcreteMethods(Class<?> type) { Method[] methods = type.
Read more >
Deprecated API - com.google.guava guava - javadoc.io
This exception is no longer thrown by com.google.common . ... Use Throwable.getStackTrace() directly, or where possible use the java.lang.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found