play framework 2.5 cannot start with raven-java-logback binding added in sbt

449 views
Skip to first unread message

shobhit singh

unread,
Aug 31, 2016, 7:28:57 AM8/31/16
to gets...@googlegroups.com
Hi All,
   I am using sentry with play2.5 which runs on lockback. As i compile with raven dependency in build.sbt ("com.getsentry.raven" % "raven-logback" % "7.6.0"), server fails to start giving class Cast exception, irrespective of whether i have made the appender entry in logback.xml or not. Its giving issue even if just raven entry is made in sbt, and nothing else.

Any lead on this, has anyone faced this earlier, or any way I can debug this. I can't see anything in play log.

Oops, cannot start the server.

java.lang.ClassCastException: org.slf4j.impl.Log4jLoggerFactory cannot be cast to ch.qos.logback.classic.LoggerContext
at play.api.libs.logback.LogbackLoggerConfigurator.configure(LogbackLoggerConfigurator.scala:77)
at play.api.libs.logback.LogbackLoggerConfigurator.configure(LogbackLoggerConfigurator.scala:59)
at play.api.inject.guice.GuiceApplicationBuilder$$anonfun$applicationModule$1.apply(GuiceApplicationBuilder.scala:102)
at play.api.inject.guice.GuiceApplicationBuilder$$anonfun$applicationModule$1.apply(GuiceApplicationBuilder.scala:102)
at scala.Option.foreach(Option.scala:257)
at play.api.inject.guice.GuiceApplicationBuilder.applicationModule(GuiceApplicationBuilder.scala:101)
at play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:181)
at play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:123)
at play.api.inject.guice.GuiceApplicationLoader.load(GuiceApplicationLoader.scala:21)
at play.core.server.ProdServerStart$.start(ProdServerStart.scala:47)
at play.core.server.ProdServerStart$.main(ProdServerStart.scala:22)
at play.core.server.ProdServerStart.main(ProdServerStart.scala)


--

Regards

Shobhit


shobhit singh

unread,
Sep 1, 2016, 4:54:29 AM9/1/16
to gets...@googlegroups.com
Okay, we were able to resolve this by excluding slf4j:

"com.getsentry.raven" % "raven-logback" % "7.6.0" exclude("org.slf4j","slf4j-api"),

Thanks,
Shobhit
--

Regards

Shobhit Singh


Reply all
Reply to author
Forward
0 new messages