m3dev / octoparts

Octoparts, the backend services aggregator
https://m3dev.github.io/octoparts/
Other
151 stars 18 forks source link

Flyway Plugin Configuration Exception #158

Closed xevix closed 9 years ago

xevix commented 9 years ago

Set up Octoparts via Vagrant as per http://m3dev.github.io/octoparts/getting-started.html and loading the default http://localhost:9000/admin gives the following:

An exception occurred during Plugin [com.github.tototoshi.play2.flyway.Plugin] initialization

No source available, here is the exception stack trace:
->com.github.tototoshi.play2.flyway.MigrationConfigurationException: db.default.url is not set.
     com.github.tototoshi.play2.flyway.ConfigReader$$anonfun$getDatabaseConfigurations$1$$anonfun$2.apply(ConfigReader.scala:34)
     com.github.tototoshi.play2.flyway.ConfigReader$$anonfun$getDatabaseConfigurations$1$$anonfun$2.apply(ConfigReader.scala:34)
     scala.Option.getOrElse(Option.scala:121)
     com.github.tototoshi.play2.flyway.ConfigReader$$anonfun$getDatabaseConfigurations$1.apply(ConfigReader.scala:33)
     com.github.tototoshi.play2.flyway.ConfigReader$$anonfun$getDatabaseConfigurations$1.apply(ConfigReader.scala:31)
     scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
     scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
     scala.collection.immutable.List.foreach(List.scala:381)
     scala.collection.TraversableLike$class.map(TraversableLike.scala:245)
     scala.collection.immutable.List.map(List.scala:285)
     com.github.tototoshi.play2.flyway.ConfigReader.getDatabaseConfigurations(ConfigReader.scala:31)
     com.github.tototoshi.play2.flyway.Plugin.<init>(Plugin.scala:35)
     sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
     sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
     java.lang.reflect.Constructor.newInstance(Constructor.java:408)
     play.api.WithDefaultPlugins$$anonfun$plugins$1$$anonfun$apply$9.apply(Application.scala:132)
     play.api.WithDefaultPlugins$$anonfun$plugins$1$$anonfun$apply$9.apply(Application.scala:130)
     scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
     scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
     scala.collection.immutable.List.foreach(List.scala:381)
     scala.collection.TraversableLike$class.map(TraversableLike.scala:245)
     scala.collection.immutable.List.map(List.scala:285)
     play.api.WithDefaultPlugins$$anonfun$plugins$1.apply(Application.scala:130)
     play.api.WithDefaultPlugins$$anonfun$plugins$1.apply(Application.scala:166)
     play.utils.Threads$.withContextClassLoader(Threads.scala:21)
     play.api.WithDefaultPlugins$class.plugins(Application.scala:128)
     play.api.DefaultApplication.plugins$lzycompute(Application.scala:402)
     play.api.DefaultApplication.plugins(Application.scala:402)
     play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:91)
     play.api.Play$$anonfun$start$1.apply(Play.scala:91)
     play.api.Play$$anonfun$start$1.apply(Play.scala:91)
     play.utils.Threads$.withContextClassLoader(Threads.scala:21)
     play.api.Play$.start(Play.scala:90)
     play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:157)
     play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(ApplicationProvider.scala:130)
     scala.Option.map(Option.scala:146)
     play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(ApplicationProvider.scala:130)
     play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$1.apply(ApplicationProvider.scala:128)
     scala.util.Success.flatMap(Try.scala:230)
     play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:128)
     play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:120)
     scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
     scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
     scala.concurrent.forkjoin.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1361)
     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)
mauhiz commented 9 years ago

Looks like the docs are obsolete. @lloydmeta ?

lloydmeta commented 9 years ago

I think this would be solved by making a copy of conf/application.dev.conf.sample to conf/application.dev.conf.

@xevix can you give that a try?

xevix commented 9 years ago

@lloydmeta Yep, that did it. Perhaps the vaygrant setup should handle this copy?

lloydmeta commented 9 years ago

@xevix sounds like a good idea. Why don't you give it a try? Inside the VM, the project is located at /octoparts

lloydmeta commented 9 years ago

Handled by #159