java.lang.NoSuchMethodError: play.api.mvc.EssentialFilter

configuration
(Pravin) #1

I am trying to integrate OKTA to Play application.
I have following changes -
application.conf
play.filters.enabled += org.pac4j.play.filters.SecurityFilter

build.sbt
lazy val playPac4jVersion = “4.0.0”
lazy val pac4jVersion = “2.1.0”
lazy val playVersion = “2.6.6”
scalaVersion := “2.11.12”

“org.pac4j” % “play-pac4j” % playPac4jVersion,
“org.pac4j” % “pac4j-oidc” % pac4jVersion exclude(“commons-io”, “commons-io”),
“org.pac4j” % “pac4j-oauth” % pac4jVersion,

Error details-

An exception or error caused a run to abort: play.api.mvc.EssentialFilter.init(Lplay/api/mvc/EssentialFilter;)V
java.lang.NoSuchMethodError: play.api.mvc.EssentialFilter.init(Lplay/api/mvc/EssentialFilter;)V
at org.pac4j.play.filters.SecurityFilter.(SecurityFilter.scala:64)

Is there any way to fix this issue without chaning scala version to 2.12.x