sentry-java: Logback Appender configured but Raven.getStoredInstance() is null

Trying to use Breadcrumbs or Raven.getStoredInstance() throws a NullPointerException. See the error below.

java.lang.NullPointerException: null
	at com.getsentry.raven.event.Breadcrumbs.record(Breadcrumbs.java:23)

As per documentation https://docs.sentry.io/clients/java/modules/logback/ it shouldn’t be null and should work, is this correct?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 18

Most upvoted comments

Oh good. I’ll release a beta3 right now.

Hey @matty, this is a known (but poorly documented) issue because appenders are lazy initialized only when the first message is logged.

This has been fixed in the overhaul/refactor/rename to sentry-java which I hope to release this week: https://github.com/getsentry/raven-java/pull/381