Hey guys,
I had sbt-one-jar setup on 2.0 beta but am now getting an error about loading ehcache.xml.
Anyone have ideas on how to fix this?
A simple way to test is: create a new play project.
Edit the plugins.sbt and add:
resolvers += Resolver.url(
"sbt-plugin-releases",
)(Resolver.ivyStylePatterns)
addSbtPlugin("com.github.retronym" % "sbt-onejar" % "0.7")
libraryDependencies += "commons-lang" % "commons-lang" % "2.6"
Edit Build.scala so that main play project looks like this:
val main = PlayProject(appName, appVersion, appDependencies, mainLang = SCALA,
settings = standardSettings ++ SbtOneJar.oneJarSettings
)
Run "play one-jar" and then "java -jar target/scala/2.9.1/YOURAPP.jar"
I get an error like this:
Play server process ID is 41418
Oops, cannot start the server.
net.sf.ehcache.CacheException: Error configuring from jar:file:/emailscorer-application.jar!/lib/play_2.9.1.jar!//ehcache.xml. Initial cause was Error configuring from input stream. Initial cause was null
at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:103)
at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:138)
at net.sf.ehcache.CacheManager.create(CacheManager.java:743)
at play.api.cache.EhCachePlugin.x$3(Cache.scala:110)
at play.api.cache.EhCachePlugin.cache(Cache.scala:109)
at play.api.cache.EhCachePlugin.onStart(Cache.scala:127)
I tried baking in the ehcache.xml into the conf directory but it still can't find it.
I know this isn't strictly a play issue but any pointers would be helpful.
Thanks!
Dan