I have migrated from play framework 2.0.8 to 2.1.0 and every thing seems perfect but i am getting following error:
play.api.UnexpectedException: Unexpected exception[ObjectExistsException: Cache play already exists] at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$1.apply(ApplicationProvider.scala:142) ~[play_2.10.jar:2.1.0] at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$1.apply(ApplicationProvider.scala:106) ~[play_2.10.jar:2.1.0] at scala.Option.map(Option.scala:145) ~[scala-library.jar:na] at play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:106) ~[play_2.10.jar:2.1.0] at play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:104) ~[play_2.10.jar:2.1.0] at scala.util.Either$RightProjection.flatMap(Either.scala:523) [scala-library.jar:na] Caused by: net.sf.ehcache.ObjectExistsException: Cache play already exists at net.sf.ehcache.CacheManager.addCache(CacheManager.java:1163) ~[ehcache-core.jar:na] at play.api.cache.EhCachePlugin.x$1$lzycompute(Cache.scala:122) ~[play_2.10.jar:2.1.0] at play.api.cache.EhCachePlugin.x$1(Cache.scala:120) ~[play_2.10.jar:2.1.0] at play.api.cache.EhCachePlugin.cache$lzycompute(Cache.scala:120) ~[play_2.10.jar:2.1.0] at play.api.cache.EhCachePlugin.cache(Cache.scala:120) ~[play_2.10.jar:2.1.0] at play.api.cache.EhCachePlugin.onStart(Cache.scala:138) ~[play_2.10.jar:2.1.0]
Any solution to this problem?
thanks!
EDITED here is my build.scala
import sbt._
import Keys._
import play.Project._
import com.github.play2war.plugin._
object ApplicationBuild extends Build {
val appName = "Lndlabproject"
val appVersion = "1.0-SNAPSHOT"
val appDependencies = Seq(
javaCore, javaJdbc, javaJpa,
"mysql" % "mysql-connector-java" % "5.1.18",
"org.hibernate" % "hibernate-entitymanager" % "4.1.3.Final",
"org.apache.httpcomponents" % "httpclient" % "4.0.3",
"japid42" % "japid42_2.9.1" % "0.5.3",
"org.apache.poi" % "poi" % "3.8",
"org.apache.poi" % "poi-ooxml" % "3.9",
"com.feth" %% "play-easymail" % "0.1-SNAPSHOT",
"org.apache.directory.studio" % "org.apache.commons.io" % "2.4",
"org.apache.ant" % "ant-jsch" % "1.7.1",
"play" % "spring_2.9.1" % "2.0" exclude("play","play_2.9.1")
)
val main = play.Project(appName, appVersion, appDependencies).settings(
Play2WarPlugin.play2WarSettings: _*)
.settings(Play2WarKeys.servletVersion := "2.5")
.settings(
// Add your own project settings here
ebeanEnabled := false,
resolvers += Resolver.url("My GitHub Play Repository", url("http://branaway.github.com/releases/"))(Resolver.ivyStylePatterns),
resolvers += Resolver.url("play-easymail (release)", url("http://joscha.github.com/play-easymail/repo/releases/")) ( Resolver.ivyStylePatterns),
resolvers += Resolver.url("play-easymail (snapshot)", url("http://joscha.github.com/play-easymail/repo/snapshots/"))(Resolver.ivyStylePatterns)
)
}
EDIT
here is result from play dependencies command
+-----------------------------------------------------------------------------+----------------------------------------------------------------+----------------------------------------------------+ | net.sf.ehcache:ehcache-core:2.6.0 | play:play_2.10:2.1.0 | As ehcache-core.jar | | | play:play_2.9.1:2.0.4 | | +-----------------------------------------------------------------------------+----------------------------------------------------------------+----------------------------------------------------+
how to exclude it?