Hi I recently migrated from 2.3.8 to 2.4.0 (play framework with Activator 1.3.6). I had 2 similar projects. I upgraded the first one without any errors. However, the 2nd project gives me this error :
NoSuchMethodError: org.apache.commons.codec.digest.DigestUtils.sha1Hex(Ljava/lang/String;)Ljava/lang/String;
There is no stack trace pointing to my code. In the web debugger it says
No source available, here is the exception stack trace:
I'm unable to figure out what's wrong. Has anyone experienced this before? Here is the screenshot of what I see after (successful) compilation and running the application:
I followed the steps given here:
https://www.playframework.com/documentation/2.4.x/Migration24 https://www.playframework.com/documentation/2.4.x/JavaEbean
Any help is appreciated. Thank you for your time.
[Update] When I disable the evolutions plugin, the errors go away. Whenever I set this to false in applicatin.conf
play.evolutions.enabled=false
The application seems to work. I believe there is some issue with the evolutions plugin. Not sure how to address the issue.
UPDATE:
Although the applications seems to run now, it is giving me the same error on calling any files from assets. Therefore, my styles are not getting compiled.
Checkout the browser console log here:
I'm logging the error message from Global.java and outputting the errors. The output in the terminal is as follows:
My build.sbt is as below:
name := """PROJECT_NAME"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayJava,PlayEbean,SbtWeb)
scalaVersion := "2.11.6"
libraryDependencies ++= Seq(
javaJdbc,
cache,
javaWs
)
libraryDependencies += "mysql" % "mysql-connector-java" % "5.1.29"
libraryDependencies += "commons-codec" % "commons-codec" % "1.10"
libraryDependencies += evolutions
includeFilter in (Assets, LessKeys.less) := "*.less"
excludeFilter in (Assets, LessKeys.less) := "_*.less"
Stack trace for the error that I logged in Global.java:
[ERROR] MESSAGE: java.lang.NoSuchMethodError: org.apache.commons.codec.digest.DigestUtils.sha1Hex(Ljava/lang/String;)Ljava/lang/String; CAUSED BY : java.lang.NoSuchMethodError: org.apache.commons.codec.digest.DigestUtils.sha1Hex(Ljava/lang/String;)Ljava/lang/String; STACK TRACE BELOW:
play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:96)
play.api.libs.iteratee.DoneIteratee$$anonfun$mapM$2.apply(Iteratee.scala:741)
play.api.libs.iteratee.DoneIteratee$$anonfun$mapM$2.apply(Iteratee.scala:741)
scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
play.api.mvc.ActionBuilder$$anon$1.apply(Action.scala:498)
akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40)
play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:105)
play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:105)
play.utils.Threads$.withContextClassLoader(Threads.scala:21)
play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:104)
play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:103)
scala.Option.map(Option.scala:146)
play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:103)
play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:96)
play.api.libs.iteratee.DoneIteratee$$anonfun$mapM$2.apply(Iteratee.scala:741)
play.api.libs.iteratee.DoneIteratee$$anonfun$mapM$2.apply(Iteratee.scala:741)
scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40)
akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:397)
scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)