commit 2956829f9d4dd348c0a2114beaa404a32f83a766 Author: nova Date: Sat May 16 15:40:23 2020 +0530 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d5566db --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +test.mv.db +.idea +.vscode +.bloop +.metals +target/ diff --git a/.scalafmt.conf b/.scalafmt.conf new file mode 100644 index 0000000..f4a5aed --- /dev/null +++ b/.scalafmt.conf @@ -0,0 +1 @@ +version = "2.4.2" diff --git a/README.md b/README.md new file mode 100644 index 0000000..067e98c --- /dev/null +++ b/README.md @@ -0,0 +1,43 @@ +# Play with Slick 3.3 + +This project shows Play working with Slick. + +This project is configured to keep all the modules self-contained. + +* Slick is isolated from Play, not using play-slick. +* Database migration is done using [Flyway](https://flywaydb.org/), not Play Evolutions. +* Slick's classes are auto-generated following database migration. + +## Database Migration + +```bash +sbt flyway/flywayMigrate +``` + +## Slick Code Generation + +You will need to run the flywayMigrate task first, and then you will be able to generate tables using sbt-codegen. + +```bash +sbt slickCodegen +``` + +## Testing + +You can run functional tests against an in memory database and Slick easily with Play from a clean slate: + +```bash +sbt clean flyway/flywayMigrate slickCodegen compile test +``` + +## Running + +To run the project, start up Play: + +```bash +sbt run +``` + +And that's it! + +Now go to , and you will see the list of users in the database. diff --git a/app/Module.scala b/app/Module.scala new file mode 100644 index 0000000..51cf614 --- /dev/null +++ b/app/Module.scala @@ -0,0 +1,41 @@ +import javax.inject.{Inject, Provider, Singleton} + +import com.example.user.UserDAO +import com.example.user.slick.SlickUserDAO +import com.google.inject.AbstractModule +import com.typesafe.config.Config +import play.api.inject.ApplicationLifecycle +import play.api.{Configuration, Environment} +import slick.jdbc.JdbcBackend.Database + +import scala.concurrent.Future +import com.example.user.CarDAO +import com.example.Car.slick.SlickCarDAO +import com.example.services.LibraryService +import com.example.user.slick.services.SlickLibraryService + +/** + * This module handles the bindings for the API to the Slick implementation. + * + * https://www.playframework.com/documentation/latest/ScalaDependencyInjection#Programmatic-bindings + */ +class Module(environment: Environment, configuration: Configuration) + extends AbstractModule { + override def configure(): Unit = { + bind(classOf[Database]).toProvider(classOf[DatabaseProvider]) + bind(classOf[UserDAO]).to(classOf[SlickUserDAO]) + bind(classOf[CarDAO]).to(classOf[SlickCarDAO]) + bind(classOf[LibraryService]).to(classOf[SlickLibraryService]) + bind(classOf[DBCloseHook]).asEagerSingleton() + } +} + +@Singleton +class DatabaseProvider @Inject() (config: Config) extends Provider[Database] { + lazy val get = Database.forConfig("myapp.database", config) +} + +/** Closes database connections safely. Important on dev restart. */ +class DBCloseHook @Inject() (db: Database, lifecycle: ApplicationLifecycle) { + lifecycle.addStopHook { () => Future.successful(db.close()) } +} diff --git a/app/controllers/HomeController.scala b/app/controllers/HomeController.scala new file mode 100644 index 0000000..a312387 --- /dev/null +++ b/app/controllers/HomeController.scala @@ -0,0 +1,39 @@ +package controllers + +import javax.inject.{Inject, Singleton} + +import com.example.user.UserDAO +import play.api.mvc._ + +import scala.concurrent.ExecutionContext +import com.example.user.CarDAO +import com.example.services.LibraryService +import play.api.libs.json.Json + +@Singleton +class HomeController @Inject() (userDAO: UserDAO, carDAO: CarDAO, libraryService: LibraryService, cc: ControllerComponents) + (implicit ec: ExecutionContext) + extends AbstractController(cc) { + + def index = Action.async { implicit request => + userDAO.all.map { users => + Ok(views.html.index(users)) + } + } + + def cars = Action.async { implicit request => + carDAO.all.map { cars => + Ok(views.html.cars(cars)) + } + } + + def book = Action.async{ + // libraryService.findBookById(1).map(e => Ok(Json.toJson(e))) + // libraryService.insertBookAndAuthor(Book("new book"), Author(2, "Some retard")) + + for { + maybeBook <- libraryService.findBookById(1) + } yield (Ok(Json.toJson(maybeBook))) + } + +} diff --git a/app/services/MyService.scala b/app/services/MyService.scala new file mode 100644 index 0000000..6b8a512 --- /dev/null +++ b/app/services/MyService.scala @@ -0,0 +1,17 @@ +package service + +import javax.inject._ +import play.api.db.slick.DatabaseConfigProvider +import scala.concurrent.ExecutionContext +import play.api.db.slick.HasDatabaseConfigProvider +import slick.jdbc.JdbcProfile + +@Singleton +class MyService @Inject() ( + protected val dbConfigProvider: DatabaseConfigProvider, + implicit val ec: ExecutionContext +) extends HasDatabaseConfigProvider[JdbcProfile] { + + import profile.api._ + db +} \ No newline at end of file diff --git a/app/views/cars.scala.html b/app/views/cars.scala.html new file mode 100644 index 0000000..3c9bc4a --- /dev/null +++ b/app/views/cars.scala.html @@ -0,0 +1,20 @@ +@import com.example.user.Car +@(cars: Seq[Car]) + + +@main("Cars Page") { +

Cars

+ + + + + + + @for(car <- cars){ + + + + + } +
IdModel
@car.id@car.model
+} diff --git a/app/views/index.scala.html b/app/views/index.scala.html new file mode 100644 index 0000000..6a5dbe1 --- /dev/null +++ b/app/views/index.scala.html @@ -0,0 +1,22 @@ +@(users: Seq[User]) + +@main("Title Page") { +

Users

+ + + + + + + + + @for(user <- users){ + + + + + + + } +
IdEmailCreated AtUpdated At
@user.id@user.email@user.createdAt@user.updatedAt
+} diff --git a/app/views/main.scala.html b/app/views/main.scala.html new file mode 100644 index 0000000..aff0eff --- /dev/null +++ b/app/views/main.scala.html @@ -0,0 +1,15 @@ +@(title: String)(content: Html) + + + + + + @title + + + + + + @content + + diff --git a/build.sbt b/build.sbt new file mode 100644 index 0000000..3f95e1e --- /dev/null +++ b/build.sbt @@ -0,0 +1,116 @@ +import com.github.tototoshi.sbt.slick.CodegenPlugin.autoImport.{ + slickCodegenDatabasePassword, + slickCodegenDatabaseUrl, + slickCodegenJdbcDriver +} +import play.core.PlayVersion.{current => playVersion} +import _root_.slick.codegen.SourceCodeGenerator +import _root_.slick.{model => m} + +lazy val databaseUrl = sys.env.getOrElse("DB_DEFAULT_URL", "jdbc:h2:./test") +lazy val databaseUser = sys.env.getOrElse("DB_DEFAULT_USER", "sa") +lazy val databasePassword = sys.env.getOrElse("DB_DEFAULT_PASSWORD", "") + +val FlywayVersion = "6.2.2" + +version in ThisBuild := "1.1-SNAPSHOT" + +resolvers in ThisBuild += Resolver.sonatypeRepo("releases") +resolvers in ThisBuild += Resolver.sonatypeRepo("snapshots") + +libraryDependencies in ThisBuild ++= Seq( + "javax.inject" % "javax.inject" % "1", + // "joda-time" % "joda-time" % "2.10.2", + // "org.joda" % "joda-convert" % "2.2.1", + "com.google.inject" % "guice" % "4.2.3" +) + +scalaVersion in ThisBuild := "2.13.1" +scalacOptions in ThisBuild ++= Seq( + "-encoding", + "UTF-8", // yes, this is 2 args + "-deprecation", + "-feature", + "-unchecked", + "-Xlint", + "-Ywarn-numeric-widen" +) +javacOptions in ThisBuild ++= Seq("-source", "1.8", "-target", "1.8") + +lazy val flyway = (project in file("modules/flyway")) + .enablePlugins(FlywayPlugin) + .settings( + libraryDependencies += "org.flywaydb" % "flyway-core" % FlywayVersion, + flywayLocations := Seq("classpath:db/migration"), + flywayUrl := databaseUrl, + flywayUser := databaseUser, + flywayPassword := databasePassword, + flywayBaselineOnMigrate := true + ) + +lazy val api = (project in file("modules/api")).settings( + libraryDependencies ++= Seq( + "com.typesafe.play" %% "play-json" % "2.8.1", + ), +) + +lazy val slick = (project in file("modules/slick")) + .enablePlugins(CodegenPlugin) + .settings( + libraryDependencies ++= Seq( + "com.zaxxer" % "HikariCP" % "3.4.2", + "com.typesafe.slick" %% "slick" % "3.3.2", + "com.typesafe.slick" %% "slick-hikaricp" % "3.3.2", + "io.bfil" %% "automapper" % "0.7.0", + "io.scalaland" %% "chimney" % "0.5.2" + // "com.github.tototoshi" %% "slick-joda-mapper" % "2.4.1" + ), + slickCodegenDatabaseUrl := databaseUrl, + slickCodegenDatabaseUser := databaseUser, + slickCodegenDatabasePassword := databasePassword, + slickCodegenDriver := _root_.slick.jdbc.H2Profile, + slickCodegenJdbcDriver := "org.h2.Driver", + slickCodegenOutputPackage := "com.example.user.slick", + slickCodegenExcludedTables := Seq("schema_version"), + slickCodegenCodeGenerator := { (model: m.Model) => + new SourceCodeGenerator(model) { + // override def code = + // "import com.github.tototoshi.slick.H2JodaSupport._\n" + "import org.joda.time.DateTime\n" + super.code + + override def Table = new Table(_) { + override def Column = new Column(_) { + override def rawType = model.tpe match { + case "java.sql.Timestamp" => + "java.time.Instant" // kill j.s.Timestamp + case _ => + super.rawType + } + } + } + } + }, + sourceGenerators in Compile += slickCodegen.taskValue + ) + .aggregate(api) + .dependsOn(api) + +lazy val root = (project in file(".")) + .enablePlugins(PlayScala) + .settings( + name := """play-scala-isolated-slick-example""", + TwirlKeys.templateImports += "com.example.user.User", + libraryDependencies ++= Seq( + guice, + "com.h2database" % "h2" % "1.4.199", + ws % Test, + "org.flywaydb" % "flyway-core" % FlywayVersion % Test, + "com.typesafe.play" %% "play-slick" % "5.0.0", + "org.scalatestplus.play" %% "scalatestplus-play" % "5.0.0" % Test, + "com.typesafe.play" %% "play-json" % "2.8.1", + "io.bfil" %% "automapper" % "0.7.0" + ), + fork in Test := true + ) + .aggregate(slick) + .dependsOn(slick) +// fork := true diff --git a/conf/application.conf b/conf/application.conf new file mode 100644 index 0000000..12e82d7 --- /dev/null +++ b/conf/application.conf @@ -0,0 +1,8 @@ +http.port=8080 +myapp = { + database = { + + numThreads=20 + maxConnections=20 + } +} \ No newline at end of file diff --git a/conf/logback.xml b/conf/logback.xml new file mode 100644 index 0000000..de7e962 --- /dev/null +++ b/conf/logback.xml @@ -0,0 +1,39 @@ + + + + + + ${application.home:-.}/logs/application.log + + %date [%level] from %logger in %thread - %message%n%xException + + + + + + %coloredLevel %logger{15} - %message%n%xException{10} + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/conf/routes b/conf/routes new file mode 100644 index 0000000..6b7520c --- /dev/null +++ b/conf/routes @@ -0,0 +1,11 @@ +# Routes +# This file defines all application routes (Higher priority routes first) +# ~~~~ + +# Home page +GET / controllers.HomeController.index +GET /cars controllers.HomeController.cars +GET /book controllers.HomeController.book + +# Map static resources from the /public folder to the /assets URL path +GET /assets/*file controllers.Assets.versioned(path="/public", file: Asset) diff --git a/logs/application.log b/logs/application.log new file mode 100644 index 0000000..6715d85 --- /dev/null +++ b/logs/application.log @@ -0,0 +1,31 @@ +2020-05-14 01:04:22,774 [INFO] from play.api.http.EnabledFilters in play-dev-mode-akka.actor.default-dispatcher-7 - Enabled Filters (see ): + + play.filters.csrf.CSRFFilter + play.filters.headers.SecurityHeadersFilter + play.filters.hosts.AllowedHostsFilter + +2020-05-14 01:04:22,780 [INFO] from play.api.Play in play-dev-mode-akka.actor.default-dispatcher-7 - Application started (Dev) (no global state) +2020-05-14 01:04:41,915 [INFO] from play.api.http.EnabledFilters in play-dev-mode-akka.actor.default-dispatcher-7 - Enabled Filters (see ): + + play.filters.csrf.CSRFFilter + play.filters.headers.SecurityHeadersFilter + play.filters.hosts.AllowedHostsFilter + +2020-05-14 01:04:41,917 [INFO] from play.api.Play in play-dev-mode-akka.actor.default-dispatcher-7 - Application started (Dev) (no global state) +2020-05-14 01:04:46,364 [INFO] from play.api.http.EnabledFilters in play-dev-mode-akka.actor.default-dispatcher-7 - Enabled Filters (see ): + + play.filters.csrf.CSRFFilter + play.filters.headers.SecurityHeadersFilter + play.filters.hosts.AllowedHostsFilter + +2020-05-14 01:04:46,366 [INFO] from play.api.Play in play-dev-mode-akka.actor.default-dispatcher-7 - Application started (Dev) (no global state) +2020-05-14 10:15:22,298 [INFO] from play.core.server.AkkaHttpServer in play-dev-mode-shutdown-hook-1 - Stopping Akka HTTP server... +2020-05-14 10:15:22,300 [INFO] from play.core.server.AkkaHttpServer in play-dev-mode-akka.actor.internal-dispatcher-5 - Terminating server binding for /0:0:0:0:0:0:0:0:8080 +2020-05-14 10:15:32,165 [INFO] from play.api.http.EnabledFilters in play-dev-mode-akka.actor.internal-dispatcher-15 - Enabled Filters (see ): + + play.filters.csrf.CSRFFilter + play.filters.headers.SecurityHeadersFilter + play.filters.hosts.AllowedHostsFilter + +2020-05-14 10:15:32,176 [INFO] from play.api.Play in play-dev-mode-akka.actor.internal-dispatcher-15 - Application started (Dev) (no global state) +2020-05-14 10:15:32,221 [INFO] from play.core.server.AkkaHttpServer in play-dev-mode-akka.actor.internal-dispatcher-18 - Running provided shutdown stop hooks diff --git a/modules/api/src/main/scala/com/example/models/Library.scala b/modules/api/src/main/scala/com/example/models/Library.scala new file mode 100644 index 0000000..7b2a7c1 --- /dev/null +++ b/modules/api/src/main/scala/com/example/models/Library.scala @@ -0,0 +1,14 @@ +package com.example.models + +import play.api.libs.json.Json +import java.time.Instant + +final case class Book(id: Long, title: String, authorId: Long, createdAt: Instant) +final case class NewBook(title: String, authorId: Long) +final case class BookDTO(title: String, authorId: Long, createdAt: Instant) +final case class Author(id: Long, name: String) +final case class NewAuthor(name: String) + +object Book { + implicit val bookJsonWrite = Json.format[Book] +} \ No newline at end of file diff --git a/modules/api/src/main/scala/com/example/services/LibraryService.scala b/modules/api/src/main/scala/com/example/services/LibraryService.scala new file mode 100644 index 0000000..b0e2eda --- /dev/null +++ b/modules/api/src/main/scala/com/example/services/LibraryService.scala @@ -0,0 +1,26 @@ +package com.example.services + +import scala.concurrent.Future +import com.example.models._ + +// trait LibraryService { +// def findBookById(id: Long): DBIO[Option[BooksRow]] + +// def findBooksWithAuthor: DBIO[Seq[(BooksRow, AuthorsRow)]] + +// def insertAuthor(author: Author): DBIO[AuthorsRow] + +// def authorToRow(author: Author): AuthorsRow +// def bookToRow(book: Book): BooksRow +// } + +trait LibraryService { + // Simple function that returns a book + def findBookById(id: Long): Future[Option[Book]] + + // Simple function that returns a list of books with it's author + def findBooksWithAuthor: Future[Seq[(Book, Author)]] + + // Insert a book and an author composing two DBIOs in a transaction + def insertBookAndAuthor(book: NewBook, author: NewAuthor): Future[(Long, Long)] +} diff --git a/modules/api/src/main/scala/com/example/user/CarDAO.scala b/modules/api/src/main/scala/com/example/user/CarDAO.scala new file mode 100644 index 0000000..cd5b8c5 --- /dev/null +++ b/modules/api/src/main/scala/com/example/user/CarDAO.scala @@ -0,0 +1,28 @@ +package com.example.user + + + +import scala.concurrent.Future +import java.time.Instant +/** + * An implementation dependent DAO. This could be implemented by Slick, Cassandra, or a REST API. + */ +trait CarDAO { + + def lookup(id: String): Future[Option[Car]] + + def all: Future[Seq[Car]] + + def update(user: Car): Future[Int] + + def delete(id: String): Future[Int] + + def create(user: Car): Future[Int] + + def close(): Future[Unit] +} + +/** + * Implementation independent aggregate root. + */ +case class Car(id: String, model: String, createdAt: Instant, updatedAt: Option[Instant]) diff --git a/modules/api/src/main/scala/com/example/user/UserDAO.scala b/modules/api/src/main/scala/com/example/user/UserDAO.scala new file mode 100644 index 0000000..d40399c --- /dev/null +++ b/modules/api/src/main/scala/com/example/user/UserDAO.scala @@ -0,0 +1,30 @@ +package com.example.user + + +import scala.concurrent.Future +import java.time.Instant + +// import com.example.Car.slick.SlickCarDAO +/** + * An implementation dependent DAO. This could be implemented by Slick, Cassandra, or a REST API. + */ +// @ImplementedBy(classOf[SlickCarDAO]) +trait UserDAO { + + def lookup(id: String): Future[Option[User]] + + def all: Future[Seq[User]] + + def update(user: User): Future[Int] + + def delete(id: String): Future[Int] + + def create(user: User): Future[Int] + + def close(): Future[Unit] +} + +/** + * Implementation independent aggregate root. + */ +case class User(id: String, email: String, createdAt: Instant, updatedAt: Option[Instant]) diff --git a/modules/flyway/src/main/resources/db/migration/V1__create_users_table.sql b/modules/flyway/src/main/resources/db/migration/V1__create_users_table.sql new file mode 100644 index 0000000..8ac8241 --- /dev/null +++ b/modules/flyway/src/main/resources/db/migration/V1__create_users_table.sql @@ -0,0 +1,6 @@ +create table "users" ( + "id" VARCHAR(255) PRIMARY KEY NOT NULL, + "email" VARCHAR(1024) NOT NULL, + created_at TIMESTAMP NOT NULL, + updated_at TIMESTAMP NULL +); diff --git a/modules/flyway/src/main/resources/db/migration/V2__add_user.sql b/modules/flyway/src/main/resources/db/migration/V2__add_user.sql new file mode 100644 index 0000000..7113f28 --- /dev/null +++ b/modules/flyway/src/main/resources/db/migration/V2__add_user.sql @@ -0,0 +1,6 @@ +INSERT INTO "users" VALUES ( + 'd074bce8-a8ca-49ec-9225-a50ffe83dc2f', + 'myuser@example.com', + (TIMESTAMP '2013-03-26T17:50:06Z'), + (TIMESTAMP '2013-03-26T17:50:06Z') +); diff --git a/modules/flyway/src/main/resources/db/migration/V3__create_cars_table.sql b/modules/flyway/src/main/resources/db/migration/V3__create_cars_table.sql new file mode 100644 index 0000000..6bcbda0 --- /dev/null +++ b/modules/flyway/src/main/resources/db/migration/V3__create_cars_table.sql @@ -0,0 +1,6 @@ +create table "cars" ( + "id" VARCHAR(255) PRIMARY KEY NOT NULL, + "model" VARCHAR(1024) NOT NULL, + created_at TIMESTAMP NOT NULL, + updated_at TIMESTAMP NULL +); diff --git a/modules/flyway/src/main/resources/db/migration/V4__add_car.sql b/modules/flyway/src/main/resources/db/migration/V4__add_car.sql new file mode 100644 index 0000000..783d41c --- /dev/null +++ b/modules/flyway/src/main/resources/db/migration/V4__add_car.sql @@ -0,0 +1,6 @@ +INSERT INTO "cars" VALUES ( + 'd074bce8-a8ca-49ec-9225-a50ffe83dc2f', + 'gxxer', + (TIMESTAMP '2013-03-26T17:50:06Z'), + (TIMESTAMP '2013-03-26T17:50:06Z') +); diff --git a/modules/flyway/src/main/resources/db/migration/V5__authors_books_table.sql b/modules/flyway/src/main/resources/db/migration/V5__authors_books_table.sql new file mode 100644 index 0000000..634dd86 --- /dev/null +++ b/modules/flyway/src/main/resources/db/migration/V5__authors_books_table.sql @@ -0,0 +1,12 @@ +create table authors ( + id IDENTITY PRIMARY KEY, + name VARCHAR(15) NOT NULL +); + +create table books ( + id IDENTITY PRIMARY KEY, + title VARCHAR(50) NOT NULL, + author_id BIGINT NOT NULL, + FOREIGN KEY(author_id) REFERENCES authors(id), + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL +); \ No newline at end of file diff --git a/modules/flyway/src/main/resources/db/migration/V6__insert_books_and_authors.sql b/modules/flyway/src/main/resources/db/migration/V6__insert_books_and_authors.sql new file mode 100644 index 0000000..7d39cbc --- /dev/null +++ b/modules/flyway/src/main/resources/db/migration/V6__insert_books_and_authors.sql @@ -0,0 +1,14 @@ +-- create table authors ( +-- id INTEGER PRIMARY KEY NOT NULL, +-- name VARCHAR(15) +-- ); + +-- create table books ( +-- id INTEGER PRIMARY KEY NOT NULL, +-- title VARCHAR(15) NOT NULL, +-- author_id INTEGER NOT NULL, +-- FOREIGN KEY(author_id) REFERENCES authors(id) +-- ); + +INSERT INTO authors (name) VALUES ('Jane Austen'); +INSERT INTO books (title, author_id) VALUES ('Pride and Prejudice', 1); \ No newline at end of file diff --git a/modules/slick/src/main/resources/application.conf b/modules/slick/src/main/resources/application.conf new file mode 100644 index 0000000..2f644fe --- /dev/null +++ b/modules/slick/src/main/resources/application.conf @@ -0,0 +1,30 @@ + +myapp = { + database = { + driver = org.h2.Driver + url = "jdbc:h2:./test" + user = "sa" + password = "" + + // The number of threads determines how many things you can *run* in parallel + // the number of connections determines you many things you can *keep in memory* at the same time + // on the database server. + // numThreads = (core_count (hyperthreading included)) + numThreads = 20 + + // queueSize = ((core_count * 2) + effective_spindle_count) + // on a MBP 13, this is 2 cores * 2 (hyperthreading not included) + 1 hard disk + queueSize = 10 + + // https://blog.knoldus.com/2016/01/01/best-practices-for-using-slick-on-production/ + // make larger than numThreads + queueSize + maxConnections = 20 + + connectionTimeout = 5000 + validationTimeout = 5000 + + connectionPool=disabled + } +} + + diff --git a/modules/slick/src/main/scala/com/example/user/slick/SlickCarDAO.scala b/modules/slick/src/main/scala/com/example/user/slick/SlickCarDAO.scala new file mode 100644 index 0000000..66e7ab5 --- /dev/null +++ b/modules/slick/src/main/scala/com/example/user/slick/SlickCarDAO.scala @@ -0,0 +1,69 @@ +package com.example.Car.slick + + +import javax.inject.{Inject, Singleton} + +// import org.joda.time.DateTime +import slick.jdbc.JdbcProfile +import slick.jdbc.JdbcBackend.Database +import com.example.user._ +import java.time.Instant + +import scala.concurrent.{ExecutionContext, Future} +import com.example.user.slick.Tables + +/** + * A Car DAO implemented with Slick, leveraging Slick code gen. + * + * Note that you must run "flyway/flywayMigrate" before "compile" here. + * + * @param db the slick database that this Car DAO is using internally, bound through Module. + * @param ec a CPU bound execution context. Slick manages blocking JDBC calls with its + * own internal thread pool, so Play's default execution context is fine here. + */ +@Singleton +class SlickCarDAO @Inject()(db: Database)(implicit ec: ExecutionContext) extends CarDAO with Tables { + + override val profile: JdbcProfile = _root_.slick.jdbc.H2Profile + + import profile.api._ + + private val queryById = Compiled( + (id: Rep[String]) => Cars.filter(_.id === id)) + + def lookup(id: String): Future[Option[Car]] = { + val f: Future[Option[CarsRow]] = db.run(queryById(id).result.headOption) + f.map(maybeRow => maybeRow.map(carsRowToCar)) + } + + def all: Future[Seq[Car]] = { + val f = db.run(Cars.result) + f.map(seq => seq.map(carsRowToCar)) + } + + def update(car: Car): Future[Int] = { + db.run(queryById(car.id).update(carToCarsRow(car))) + } + + def delete(id: String): Future[Int] = { + db.run(queryById(id).delete) + } + + def create(car: Car): Future[Int] = { + db.run( + Cars += carToCarsRow(car.copy(createdAt = Instant.now())) + ) + } + + def close(): Future[Unit] = { + Future.successful(db.close()) + } + + private def carToCarsRow(car: Car): CarsRow = { + CarsRow(car.id, car.model, car.createdAt, car.updatedAt) + } + + private def carsRowToCar(carsRow: CarsRow): Car = { + Car(carsRow.id, carsRow.model, carsRow.createdAt, carsRow.updatedAt) + } +} diff --git a/modules/slick/src/main/scala/com/example/user/slick/SlickUserDAO.scala b/modules/slick/src/main/scala/com/example/user/slick/SlickUserDAO.scala new file mode 100644 index 0000000..f12ed08 --- /dev/null +++ b/modules/slick/src/main/scala/com/example/user/slick/SlickUserDAO.scala @@ -0,0 +1,67 @@ +package com.example.user.slick + +import javax.inject.{Inject, Singleton} + +// import org.joda.time.DateTime +import slick.jdbc.JdbcProfile +import slick.jdbc.JdbcBackend.Database +import com.example.user._ +import java.time.Instant + +import scala.concurrent.{ExecutionContext, Future} + +/** + * A User DAO implemented with Slick, leveraging Slick code gen. + * + * Note that you must run "flyway/flywayMigrate" before "compile" here. + * + * @param db the slick database that this user DAO is using internally, bound through Module. + * @param ec a CPU bound execution context. Slick manages blocking JDBC calls with its + * own internal thread pool, so Play's default execution context is fine here. + */ +@Singleton +class SlickUserDAO @Inject()(db: Database)(implicit ec: ExecutionContext) extends UserDAO with Tables { + + override val profile: JdbcProfile = _root_.slick.jdbc.H2Profile + + import profile.api._ + + private val queryById = Compiled( + (id: Rep[String]) => Users.filter(_.id === id)) + + def lookup(id: String): Future[Option[User]] = { + val f: Future[Option[UsersRow]] = db.run(queryById(id).result.headOption) + f.map(maybeRow => maybeRow.map(usersRowToUser)) + } + + def all: Future[Seq[User]] = { + val f = db.run(Users.result) + f.map(seq => seq.map(usersRowToUser)) + } + + def update(user: User): Future[Int] = { + db.run(queryById(user.id).update(userToUsersRow(user))) + } + + def delete(id: String): Future[Int] = { + db.run(queryById(id).delete) + } + + def create(user: User): Future[Int] = { + db.run( + Users += userToUsersRow(user.copy(createdAt = Instant.now())) + ) + } + + def close(): Future[Unit] = { + Future.successful(db.close()) + } + + private def userToUsersRow(user: User): UsersRow = { + UsersRow(user.id, user.email, user.createdAt, user.updatedAt) + } + + private def usersRowToUser(usersRow: UsersRow): User = { + User(usersRow.id, usersRow.email, usersRow.createdAt, usersRow.updatedAt) + } +} diff --git a/modules/slick/src/main/scala/com/example/user/slick/dbios/SlickLibraryDbio.scala b/modules/slick/src/main/scala/com/example/user/slick/dbios/SlickLibraryDbio.scala new file mode 100644 index 0000000..83d055f --- /dev/null +++ b/modules/slick/src/main/scala/com/example/user/slick/dbios/SlickLibraryDbio.scala @@ -0,0 +1,103 @@ +package com.example.user.slick.dbios + +import slick.jdbc.JdbcProfile +import com.example.models._ +import io.scalaland.chimney.dsl._ +import com.example.user.slick.Tables +import javax.inject.Singleton +// import slick.jdbc.H2Profile.api._ +// import scala.concurrent.ExecutionContext + +@Singleton +class SlickLibraryDbio extends Tables { + + override val profile: JdbcProfile = _root_.slick.jdbc.H2Profile + + import profile.api._ + + def findBookById(id: Long): DBIO[Option[BooksRow]] = + Query.bookById(id).result.headOption + + def findBookById2(id: Long): DBIO[Option[BookWithoutId]] = + Query.test(id).result.headOption + + def findBooksWithAuthor: DBIO[Seq[(BooksRow, AuthorsRow)]] = + Query.booksWithAuthor.result + + def insertBook(book: Book): DBIO[BooksRow] = + Query.writeBooks += bookToRow(book) + + def insertBook2(book: NewBook): DBIO[Long] = + Query.writeBooks3 += book +// + def insertAuthor(author: Author): DBIO[AuthorsRow] = + Query.writeAuthors += authorToRow(author) + + def insertAuthor2(author: NewAuthor): DBIO[Long] = + Query.writeAuthors2 += author + + def authorToRow(author: Author) = author.transformInto[AuthorsRow] + def bookToRow(book: Book) = book.transformInto[BooksRow] + def authorsRowToAuthor(author: AuthorsRow) = author.transformInto[Author] + def booksRowToBooks(book: BooksRow) = book.transformInto[Book] + def booksRowToBooks2(book: BooksRow) = book.transformInto[BookWithoutId] + // As mentioned under #2, we do encapsulate our queries + object Query { + + // Return the book / author with it's auto incremented + // id instead of an insert count + lazy val writeBooks = Books returning Books + .map(_.id) into ((book, id) => book.copy(id)) + lazy val writeBooks2 = + Books.map(b => (b.title, b.authorId).mapTo[BookWithoutId]) + lazy val writeBooks3 = Books + .map(b => (b.title, b.authorId).mapTo[NewBook]) + .returning(Books.map(_.id)) + + lazy val writeAuthors = Authors returning Authors + .map(_.id) into ((author, id) => author.copy(id)) + lazy val writeAuthors2 = + Authors.map(a => (a.name).mapTo[NewAuthor]) returning Authors.map(_.id) + + lazy val test = (givenId: Long) => + Books + .filter(_.id === givenId) + .map(toBooksWithoutID) + + lazy val bookById = Books.findBy(_.id) + + lazy val toBooksWithoutID = (table: Books) => + (table.title, table.authorId).mapTo[BookWithoutId] + + lazy val booksWithAuthor = for { + b <- Books + a <- Authors if b.authorId === a.id + } yield (b, a) + + lazy val authorOfBook = (bookId: Long) => + for { + (authors, books) <- Authors join Books on (_.id === _.authorId) filter { + case (authors, books) => books.id === bookId + } + } yield (authors, books) + + lazy val authorOfBook2 = (bookId: Long) => + for { + authorId <- Books.filter(_.id === bookId).take(1).map(_.authorId) + authors <- Authors filter (_.id === authorId) + } yield (authors.name) + + // lazy val authorOfBook3 = (bookId: Long) => + // for { + // authorId <- bookById(bookId).map(_.map(_.authorId)) + // (authors) <- Authors filter (_.id === authorId) + // } yield (authors) + } + case class BookWithoutId(title: String, authorId: Long) + // def test() = { + // val maybeBook = findBookById(1) + // val x = maybeBook.map(_.map(_.title)) + + // db.run(x) + // } +} diff --git a/modules/slick/src/main/scala/com/example/user/slick/services/SlickLibraryService.scala b/modules/slick/src/main/scala/com/example/user/slick/services/SlickLibraryService.scala new file mode 100644 index 0000000..014c664 --- /dev/null +++ b/modules/slick/src/main/scala/com/example/user/slick/services/SlickLibraryService.scala @@ -0,0 +1,55 @@ +package com.example.user.slick.services + +import javax.inject._ +import scala.concurrent.ExecutionContext +// import slick.jdbc.JdbcProfile +import slick.jdbc.JdbcBackend.Database +import scala.concurrent.Future +import com.example.models._ +import com.example.user.slick.dbios.SlickLibraryDbio +import com.example.services.LibraryService +// import slick.jdbc.H2Profile.api._ + +@Singleton +class SlickLibraryService @Inject() ( + db: Database, + libraryDbio: SlickLibraryDbio +)(implicit ec: ExecutionContext) + extends LibraryService { + import libraryDbio.profile.api._ + + // Simple function that returns a book + def findBookById(id: Long): Future[Option[Book]] = + db.run(libraryDbio.findBookById(id).map(_.map(libraryDbio.booksRowToBooks))) + + // Simple function that returns a list of books with it's author + def findBooksWithAuthor: Future[Seq[(Book, Author)]] = + db.run(libraryDbio.findBooksWithAuthor.map { lst => + lst.map(tup => { + val (x, y) = tup + (libraryDbio.booksRowToBooks(x), libraryDbio.authorsRowToAuthor(y)) + }) + }) + + // Insert a book and an author composing two DBIOs in a transaction + def insertBookAndAuthor( + book: NewBook, + author: NewAuthor + ): Future[(Long, Long)] = { + val action = for { + authorId <- libraryDbio.insertAuthor2(author) + bookId <- libraryDbio.insertBook2(book.copy(authorId = authorId)) + } yield ( + // libraryDbio.booksRowToBooks(book), + // libraryDbio.authorsRowToAuthor(author) + bookId, + authorId + ) + db.run(action.transactionally) + } + + def findBookById2(id: Long) = + db.run(libraryDbio.findBookById(id).map(_.map(_.title))) + +} +case class Book2(title: String) diff --git a/project/build.properties b/project/build.properties new file mode 100644 index 0000000..5a9ed92 --- /dev/null +++ b/project/build.properties @@ -0,0 +1 @@ +sbt.version=1.3.4 diff --git a/project/metals.sbt b/project/metals.sbt new file mode 100644 index 0000000..e36d9e9 --- /dev/null +++ b/project/metals.sbt @@ -0,0 +1,4 @@ +// DO NOT EDIT! This file is auto-generated. +// This file enables sbt-bloop to create bloop config files. + +addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.0-RC1-229-b7c15aa9") diff --git a/project/plugins.sbt b/project/plugins.sbt new file mode 100644 index 0000000..db9c511 --- /dev/null +++ b/project/plugins.sbt @@ -0,0 +1,14 @@ +resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots" + +libraryDependencies += "com.h2database" % "h2" % "1.4.196" + +// Database migration +// https://github.com/flyway/flyway-sbt +addSbtPlugin("io.github.davidmweber" % "flyway-sbt" % "6.2.2") + +// Slick code generation +// https://github.com/tototoshi/sbt-slick-codegen +addSbtPlugin("com.github.tototoshi" % "sbt-slick-codegen" % "1.4.0") + +// The Play plugin +addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.1") diff --git a/public/images/favicon.png b/public/images/favicon.png new file mode 100644 index 0000000..c7d92d2 Binary files /dev/null and b/public/images/favicon.png differ diff --git a/public/javascripts/hello.js b/public/javascripts/hello.js new file mode 100644 index 0000000..209fbee --- /dev/null +++ b/public/javascripts/hello.js @@ -0,0 +1,3 @@ +if (window.console) { + console.log("Welcome to your Play application's JavaScript!"); +} \ No newline at end of file diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css new file mode 100644 index 0000000..e69de29 diff --git a/scripts/test-sbt b/scripts/test-sbt new file mode 100755 index 0000000..87a3096 --- /dev/null +++ b/scripts/test-sbt @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +echo "+----------------------------+" +echo "| Executing tests using sbt |" +echo "+----------------------------+" +sbt ++$TRAVIS_SCALA_VERSION clean flyway/flywayMigrate slickCodegen test diff --git a/test.trace.db b/test.trace.db new file mode 100644 index 0000000..1ed50d4 --- /dev/null +++ b/test.trace.db @@ -0,0 +1,2750 @@ +2020-05-10 16:51:29 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-10 16:51:29 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at slick.jdbc.JdbcBackend$BaseSession.(JdbcBackend.scala:494) + at slick.jdbc.JdbcBackend$DatabaseDef.createSession(JdbcBackend.scala:46) + at slick.jdbc.JdbcBackend$DatabaseDef.createSession(JdbcBackend.scala:37) + at slick.basic.BasicBackend$DatabaseDef.acquireSession(BasicBackend.scala:249) + at slick.basic.BasicBackend$DatabaseDef.acquireSession$(BasicBackend.scala:248) + at slick.jdbc.JdbcBackend$DatabaseDef.acquireSession(JdbcBackend.scala:37) + at slick.basic.BasicBackend$DatabaseDef$$anon$3.run(BasicBackend.scala:274) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 33 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 28 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 29 more +2020-05-10 16:51:34 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-10 16:51:34 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-10 16:51:37 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.199/7]" [50000-199] + at org.h2.message.DbException.get(DbException.java:194) + at org.h2.message.DbException.convert(DbException.java:347) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:90) + at org.h2.mvstore.MVStore.handleException(MVStore.java:2787) + at org.h2.mvstore.MVStore.panic(MVStore.java:441) + at org.h2.mvstore.MVStore.(MVStore.java:404) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:3343) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:162) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:95) + at org.h2.engine.Database.getPageStore(Database.java:2739) + at org.h2.engine.Database.open(Database.java:769) + at org.h2.engine.Database.openDatabase(Database.java:319) + at org.h2.engine.Database.(Database.java:313) + at org.h2.engine.Engine.openSession(Engine.java:69) + at org.h2.engine.Engine.openSession(Engine.java:201) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:178) + at org.h2.engine.Engine.createSession(Engine.java:161) + at org.h2.engine.Engine.createSession(Engine.java:31) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:336) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:169) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:148) + at org.h2.Driver.connect(Driver.java:69) + at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) + at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:354) + at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:202) + at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:473) + at com.zaxxer.hikari.pool.HikariPool.access$100(HikariPool.java:71) + at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:719) + at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:705) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.199/7]" [50000-199] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:502) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:427) + ... 33 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.199/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:883) + at org.h2.mvstore.FileStore.open(FileStore.java:166) + at org.h2.mvstore.MVStore.(MVStore.java:390) + ... 27 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:163) + ... 28 more +2020-05-10 16:51:37 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.199/7]" [50000-199] + at org.h2.message.DbException.get(DbException.java:194) + at org.h2.message.DbException.convert(DbException.java:347) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:90) + at org.h2.mvstore.MVStore.handleException(MVStore.java:2787) + at org.h2.mvstore.MVStore.panic(MVStore.java:441) + at org.h2.mvstore.MVStore.(MVStore.java:404) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:3343) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:162) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:95) + at org.h2.engine.Database.getPageStore(Database.java:2739) + at org.h2.engine.Database.open(Database.java:769) + at org.h2.engine.Database.openDatabase(Database.java:319) + at org.h2.engine.Database.(Database.java:313) + at org.h2.engine.Engine.openSession(Engine.java:69) + at org.h2.engine.Engine.openSession(Engine.java:201) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:178) + at org.h2.engine.Engine.createSession(Engine.java:161) + at org.h2.engine.Engine.createSession(Engine.java:31) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:336) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:169) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:148) + at org.h2.Driver.connect(Driver.java:69) + at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) + at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:354) + at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:202) + at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:473) + at com.zaxxer.hikari.pool.HikariPool.access$100(HikariPool.java:71) + at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:719) + at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:705) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLNonTransientException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.199/7]" [50000-199] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:502) + at org.h2.message.DbException.getJdbcSQLException(DbException.java:427) + ... 33 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.199/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:883) + at org.h2.mvstore.FileStore.open(FileStore.java:166) + at org.h2.mvstore.MVStore.(MVStore.java:390) + ... 27 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:163) + ... 28 more +2020-05-10 17:32:32 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at org.flywaydb.core.internal.jdbc.DriverDataSource.getConnectionFromDriver(DriverDataSource.java:456) + at org.flywaydb.core.internal.jdbc.DriverDataSource.getConnection(DriverDataSource.java:422) + at org.flywaydb.core.internal.jdbc.JdbcUtils.openConnection(JdbcUtils.java:56) + at org.flywaydb.core.internal.jdbc.JdbcConnectionFactory.(JdbcConnectionFactory.java:80) + at org.flywaydb.core.Flyway.execute(Flyway.java:447) + at org.flywaydb.core.Flyway.migrate(Flyway.java:153) + at io.github.davidmweber.FlywayPlugin$.$anonfun$flywayBaseSettings$47(FlywayPlugin.scala:190) + at io.github.davidmweber.FlywayPlugin$.$anonfun$flywayBaseSettings$47$adapted(FlywayPlugin.scala:190) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 44 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 39 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 40 more +2020-05-10 18:12:52 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-10 18:12:55 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-11 14:11:48 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-11 14:11:48 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-11 14:11:58 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-11 15:04:53 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-11 15:05:17 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-11 15:05:17 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-11 15:05:21 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-11 15:06:09 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-11 15:06:35 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-11 15:06:35 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-11 15:06:39 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-11 15:06:53 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-11 15:11:21 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-11 15:11:36 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-11 15:11:36 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-12 12:19:32 jdbc[4]: exception +org.h2.jdbc.JdbcSQLException: Column "Jane Austen" not found; SQL statement: +INSERT INTO authors (name) VALUES ("Jane Austen") [42122-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.expression.ExpressionColumn.optimize(ExpressionColumn.java:147) + at org.h2.command.dml.Insert.prepare(Insert.java:270) + at org.h2.command.Parser.prepareCommand(Parser.java:263) + at org.h2.engine.Session.prepareLocal(Session.java:578) + at org.h2.engine.Session.prepareCommand(Session.java:519) + at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1204) + at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:176) + at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:164) + at org.flywaydb.core.internal.jdbc.JdbcTemplate.executeStatement(JdbcTemplate.java:244) + at org.flywaydb.core.internal.sqlscript.ParsedSqlStatement.execute(ParsedSqlStatement.java:111) + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:208) + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.execute(DefaultSqlScriptExecutor.java:127) + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.executeOnce(SqlMigrationExecutor.java:88) + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.access$000(SqlMigrationExecutor.java:33) + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor$1.call(SqlMigrationExecutor.java:77) + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor$1.call(SqlMigrationExecutor.java:74) + at org.flywaydb.core.internal.database.DefaultExecutionStrategy.execute(DefaultExecutionStrategy.java:28) + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:74) + at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:366) + at org.flywaydb.core.internal.command.DbMigrate.access$200(DbMigrate.java:54) + at org.flywaydb.core.internal.command.DbMigrate$3.call(DbMigrate.java:282) + at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:95) + at org.flywaydb.core.internal.command.DbMigrate.applyMigrations(DbMigrate.java:279) + at org.flywaydb.core.internal.command.DbMigrate.migrateGroup(DbMigrate.java:244) + at org.flywaydb.core.internal.command.DbMigrate.access$100(DbMigrate.java:54) + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:162) + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:159) + at org.flywaydb.core.internal.database.base.Connection$1.call(Connection.java:131) + at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:95) + at org.flywaydb.core.internal.database.base.Connection.lock(Connection.java:127) + at org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory.lock(JdbcTableSchemaHistory.java:139) + at org.flywaydb.core.internal.command.DbMigrate.migrateAll(DbMigrate.java:159) + at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:137) + at org.flywaydb.core.Flyway$1.execute(Flyway.java:193) + at org.flywaydb.core.Flyway$1.execute(Flyway.java:153) + at org.flywaydb.core.Flyway.execute(Flyway.java:521) + at org.flywaydb.core.Flyway.migrate(Flyway.java:153) + at io.github.davidmweber.FlywayPlugin$.$anonfun$flywayBaseSettings$47(FlywayPlugin.scala:190) + at io.github.davidmweber.FlywayPlugin$.$anonfun$flywayBaseSettings$47$adapted(FlywayPlugin.scala:190) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +2020-05-12 12:22:14 jdbc[4]: exception +org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement " + + + + + + + + + + +CREATE TABLE AUTHORS ( + ID INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT[*], + NAME VARCHAR(15) +) "; expected "CHECK, REFERENCES, ,, )"; SQL statement: +-- class Books(tag: Tag) extends Table[Book](tag, "book") { +-- def id = column[Long]("id", O.PrimaryKey, O.AutoInc) +-- def title = column[String]("first") +-- def authorId = column[Long]("author_id") +-- def * = (id.?, title, authorId) <> (Book.tupled, Book.unapply) +-- } +-- class Authors(tag: Tag) extends Table[Author](tag, "author") { +-- def id = column[Long]("id", O.PrimaryKey, O.AutoInc) +-- def name = column[String]("name") +-- def * = (id.?, name) <> (Author.tupled, Author.unapply) +-- } +create table authors ( + id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + name VARCHAR(15) +) [42001-196] +2020-05-12 12:26:39 jdbc[4]: exception +org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement " + + + + + + + + + + +CREATE TABLE AUTHORS ( + ID INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT[*], + NAME VARCHAR(15) +) "; expected "CHECK, REFERENCES, ,, )"; SQL statement: +-- class Books(tag: Tag) extends Table[Book](tag, "book") { +-- def id = column[Long]("id", O.PrimaryKey, O.AutoInc) +-- def title = column[String]("first") +-- def authorId = column[Long]("author_id") +-- def * = (id.?, title, authorId) <> (Book.tupled, Book.unapply) +-- } +-- class Authors(tag: Tag) extends Table[Author](tag, "author") { +-- def id = column[Long]("id", O.PrimaryKey, O.AutoInc) +-- def name = column[String]("name") +-- def * = (id.?, name) <> (Author.tupled, Author.unapply) +-- } +create table authors ( + id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + name VARCHAR(15) +) [42001-196] +2020-05-12 12:27:42 jdbc[4]: exception +org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement " + + + + + + + + + + +CREATE TABLE AUTHORS ( + ID INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT[*], + NAME VARCHAR(15) +) "; expected "CHECK, REFERENCES, ,, )"; SQL statement: +-- class Books(tag: Tag) extends Table[Book](tag, "book") { +-- def id = column[Long]("id", O.PrimaryKey, O.AutoInc) +-- def title = column[String]("first") +-- def authorId = column[Long]("author_id") +-- def * = (id.?, title, authorId) <> (Book.tupled, Book.unapply) +-- } +-- class Authors(tag: Tag) extends Table[Author](tag, "author") { +-- def id = column[Long]("id", O.PrimaryKey, O.AutoInc) +-- def name = column[String]("name") +-- def * = (id.?, name) <> (Author.tupled, Author.unapply) +-- } +create table authors ( + id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + name VARCHAR(15) +) [42001-196] +2020-05-12 12:28:32 jdbc[4]: exception +org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement " + + + + + + + + + + +CREATE TABLE AUTHORS ( + ID INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT[*], + NAME VARCHAR(15) +) "; expected "CHECK, REFERENCES, ,, )"; SQL statement: +-- class Books(tag: Tag) extends Table[Book](tag, "book") { +-- def id = column[Long]("id", O.PrimaryKey, O.AutoInc) +-- def title = column[String]("first") +-- def authorId = column[Long]("author_id") +-- def * = (id.?, title, authorId) <> (Book.tupled, Book.unapply) +-- } +-- class Authors(tag: Tag) extends Table[Author](tag, "author") { +-- def id = column[Long]("id", O.PrimaryKey, O.AutoInc) +-- def name = column[String]("name") +-- def * = (id.?, name) <> (Author.tupled, Author.unapply) +-- } +create table authors ( + id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + name VARCHAR(15) +) [42001-196] +2020-05-12 12:29:46 jdbc[4]: exception +org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "CREATE TABLE AUTHORS ( + ID INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT[*], + NAME VARCHAR(15) +) "; expected "CHECK, REFERENCES, ,, )"; SQL statement: +create table authors ( + id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + name VARCHAR(15) +) [42001-196] +2020-05-12 12:34:11 jdbc[4]: exception +org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "CREATE TABLE AUTHORS ( + ID INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT[*], + NAME VARCHAR(15) +) "; expected "CHECK, REFERENCES, ,, )"; SQL statement: +create table authors ( + id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + name VARCHAR(15) +) [42001-196] +2020-05-12 12:34:59 jdbc[4]: exception +org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "CREATE TABLE AUTHORS ( + ID INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT[*], + NAME VARCHAR(15) +) "; expected "CHECK, REFERENCES, ,, )"; SQL statement: +create table authors ( + id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + name VARCHAR(15) +) [42001-196] +2020-05-12 12:36:22 jdbc[4]: exception +org.h2.jdbc.JdbcSQLException: Column "Jane Austen" not found; SQL statement: +INSERT INTO authors (name) VALUES ("Jane Austen") [42122-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.expression.ExpressionColumn.optimize(ExpressionColumn.java:147) + at org.h2.command.dml.Insert.prepare(Insert.java:270) + at org.h2.command.Parser.prepareCommand(Parser.java:263) + at org.h2.engine.Session.prepareLocal(Session.java:578) + at org.h2.engine.Session.prepareCommand(Session.java:519) + at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1204) + at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:176) + at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:164) + at org.flywaydb.core.internal.jdbc.JdbcTemplate.executeStatement(JdbcTemplate.java:244) + at org.flywaydb.core.internal.sqlscript.ParsedSqlStatement.execute(ParsedSqlStatement.java:111) + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:208) + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.execute(DefaultSqlScriptExecutor.java:127) + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.executeOnce(SqlMigrationExecutor.java:88) + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.access$000(SqlMigrationExecutor.java:33) + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor$1.call(SqlMigrationExecutor.java:77) + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor$1.call(SqlMigrationExecutor.java:74) + at org.flywaydb.core.internal.database.DefaultExecutionStrategy.execute(DefaultExecutionStrategy.java:28) + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:74) + at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:366) + at org.flywaydb.core.internal.command.DbMigrate.access$200(DbMigrate.java:54) + at org.flywaydb.core.internal.command.DbMigrate$3.call(DbMigrate.java:282) + at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:95) + at org.flywaydb.core.internal.command.DbMigrate.applyMigrations(DbMigrate.java:279) + at org.flywaydb.core.internal.command.DbMigrate.migrateGroup(DbMigrate.java:244) + at org.flywaydb.core.internal.command.DbMigrate.access$100(DbMigrate.java:54) + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:162) + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:159) + at org.flywaydb.core.internal.database.base.Connection$1.call(Connection.java:131) + at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:95) + at org.flywaydb.core.internal.database.base.Connection.lock(Connection.java:127) + at org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory.lock(JdbcTableSchemaHistory.java:139) + at org.flywaydb.core.internal.command.DbMigrate.migrateAll(DbMigrate.java:159) + at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:137) + at org.flywaydb.core.Flyway$1.execute(Flyway.java:193) + at org.flywaydb.core.Flyway$1.execute(Flyway.java:153) + at org.flywaydb.core.Flyway.execute(Flyway.java:521) + at org.flywaydb.core.Flyway.migrate(Flyway.java:153) + at io.github.davidmweber.FlywayPlugin$.$anonfun$flywayBaseSettings$47(FlywayPlugin.scala:190) + at io.github.davidmweber.FlywayPlugin$.$anonfun$flywayBaseSettings$47$adapted(FlywayPlugin.scala:190) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +2020-05-12 12:58:59 jdbc[4]: exception +org.h2.jdbc.JdbcSQLException: Attempt to define a second primary key; SQL statement: +create table books ( + id IDENTITY PRIMARY KEY NOT NULL , + title VARCHAR(50) NOT NULL, + author_id IDENTITY NOT NULL, + FOREIGN KEY(author_id) REFERENCES authors(id) +) [90017-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.command.ddl.CreateTable.setPrimaryKeyColumns(CreateTable.java:284) + at org.h2.command.ddl.CreateTable.addConstraintCommand(CreateTable.java:86) + at org.h2.command.Parser.parseCreateTable(Parser.java:6165) + at org.h2.command.Parser.parseCreate(Parser.java:4351) + at org.h2.command.Parser.parsePrepared(Parser.java:366) + at org.h2.command.Parser.parse(Parser.java:321) + at org.h2.command.Parser.parse(Parser.java:293) + at org.h2.command.Parser.prepareCommand(Parser.java:258) + at org.h2.engine.Session.prepareLocal(Session.java:578) + at org.h2.engine.Session.prepareCommand(Session.java:519) + at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1204) + at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:176) + at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:164) + at org.flywaydb.core.internal.jdbc.JdbcTemplate.executeStatement(JdbcTemplate.java:244) + at org.flywaydb.core.internal.sqlscript.ParsedSqlStatement.execute(ParsedSqlStatement.java:111) + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:208) + at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.execute(DefaultSqlScriptExecutor.java:127) + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.executeOnce(SqlMigrationExecutor.java:88) + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.access$000(SqlMigrationExecutor.java:33) + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor$1.call(SqlMigrationExecutor.java:77) + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor$1.call(SqlMigrationExecutor.java:74) + at org.flywaydb.core.internal.database.DefaultExecutionStrategy.execute(DefaultExecutionStrategy.java:28) + at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:74) + at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:366) + at org.flywaydb.core.internal.command.DbMigrate.access$200(DbMigrate.java:54) + at org.flywaydb.core.internal.command.DbMigrate$3.call(DbMigrate.java:282) + at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:95) + at org.flywaydb.core.internal.command.DbMigrate.applyMigrations(DbMigrate.java:279) + at org.flywaydb.core.internal.command.DbMigrate.migrateGroup(DbMigrate.java:244) + at org.flywaydb.core.internal.command.DbMigrate.access$100(DbMigrate.java:54) + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:162) + at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:159) + at org.flywaydb.core.internal.database.base.Connection$1.call(Connection.java:131) + at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:95) + at org.flywaydb.core.internal.database.base.Connection.lock(Connection.java:127) + at org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory.lock(JdbcTableSchemaHistory.java:139) + at org.flywaydb.core.internal.command.DbMigrate.migrateAll(DbMigrate.java:159) + at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:137) + at org.flywaydb.core.Flyway$1.execute(Flyway.java:193) + at org.flywaydb.core.Flyway$1.execute(Flyway.java:153) + at org.flywaydb.core.Flyway.execute(Flyway.java:521) + at org.flywaydb.core.Flyway.migrate(Flyway.java:153) + at io.github.davidmweber.FlywayPlugin$.$anonfun$flywayBaseSettings$47(FlywayPlugin.scala:190) + at io.github.davidmweber.FlywayPlugin$.$anonfun$flywayBaseSettings$47$adapted(FlywayPlugin.scala:190) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +2020-05-12 21:29:08 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-12 21:29:12 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-12 21:29:17 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-12 21:29:17 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-12 21:30:09 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-12 21:31:43 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-12 21:31:43 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-12 21:31:49 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-13 12:30:17 jdbc[4]: exception +org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "CREATE TABLE BOOKS ( + ID IDENTITY PRIMARY KEY, + TITLE VARCHAR(50) NOT NULL, + AUTHOR_ID BIGINT NOT NULL, + FOREIGN KEY(AUTHOR_ID) REFERENCES AUTHORS(ID) + CREATED_AT[*] TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP +) "; expected "INDEX, ON, NOT, DEFERRABLE, NOCHECK, CHECK, ,, )"; SQL statement: +create table books ( + id IDENTITY PRIMARY KEY, + title VARCHAR(50) NOT NULL, + author_id BIGINT NOT NULL, + FOREIGN KEY(author_id) REFERENCES authors(id) + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP +) [42001-196] +2020-05-13 12:30:45 jdbc[4]: exception +org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "CREATE TABLE BOOKS ( + ID IDENTITY PRIMARY KEY, + TITLE VARCHAR(50) NOT NULL, + AUTHOR_ID BIGINT NOT NULL, + FOREIGN KEY(AUTHOR_ID) REFERENCES AUTHORS(ID) + CREATED_AT[*] TIMESTAMP NOT NULL DEFAULT(CURRENT_TIMESTAMP) +) "; expected "INDEX, ON, NOT, DEFERRABLE, NOCHECK, CHECK, ,, )"; SQL statement: +create table books ( + id IDENTITY PRIMARY KEY, + title VARCHAR(50) NOT NULL, + author_id BIGINT NOT NULL, + FOREIGN KEY(author_id) REFERENCES authors(id) + created_at TIMESTAMP NOT NULL DEFAULT(CURRENT_TIMESTAMP) +) [42001-196] +2020-05-13 12:32:46 jdbc[4]: exception +org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "CREATE TABLE BOOKS ( + ID IDENTITY PRIMARY KEY, + TITLE VARCHAR(50) NOT NULL, + AUTHOR_ID BIGINT NOT NULL, + FOREIGN KEY(AUTHOR_ID) REFERENCES AUTHORS(ID) + CREATED_AT[*] TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL +) "; expected "INDEX, ON, NOT, DEFERRABLE, NOCHECK, CHECK, ,, )"; SQL statement: +create table books ( + id IDENTITY PRIMARY KEY, + title VARCHAR(50) NOT NULL, + author_id BIGINT NOT NULL, + FOREIGN KEY(author_id) REFERENCES authors(id) + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL +) [42001-196] +2020-05-14 00:17:38 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-14 00:17:42 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-14 00:17:42 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-14 00:21:06 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-14 00:21:09 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-14 00:21:32 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-14 01:03:23 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-14 01:03:49 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more +2020-05-14 01:03:49 database: flush +org.h2.message.DbException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.get(DbException.java:168) + at org.h2.message.DbException.convert(DbException.java:295) + at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:95) + at org.h2.mvstore.MVStore.panic(MVStore.java:378) + at org.h2.mvstore.MVStore.(MVStore.java:361) + at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930) + at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:155) + at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100) + at org.h2.engine.Database.getPageStore(Database.java:2476) + at org.h2.engine.Database.open(Database.java:697) + at org.h2.engine.Database.openDatabase(Database.java:276) + at org.h2.engine.Database.(Database.java:270) + at org.h2.engine.Engine.openSession(Engine.java:64) + at org.h2.engine.Engine.openSession(Engine.java:176) + at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) + at org.h2.engine.Engine.createSession(Engine.java:137) + at org.h2.engine.Engine.createSession(Engine.java:27) + at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:116) + at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:100) + at org.h2.Driver.connect(Driver.java:69) + at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101) + at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:71) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.gen(CodegenPlugin.scala:81) + at com.github.tototoshi.sbt.slick.CodegenPlugin$.$anonfun$projectSettings$13(CodegenPlugin.scala:156) + at scala.Function1.$anonfun$compose$1(Function1.scala:49) + at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) + at sbt.std.Transform$$anon$4.work(Transform.scala:67) + at sbt.Execute.$anonfun$submit$2(Execute.scala:281) + at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19) + at sbt.Execute.work(Execute.scala:290) + at sbt.Execute.$anonfun$submit$1(Execute.scala:281) + at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) + at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) + at java.base/java.lang.Thread.run(Thread.java:834) +Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7]" [50000-196] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) + ... 40 more +Caused by: java.lang.IllegalStateException: The file is locked: nio:/home/rohan/Documents/Programming/Scala/play-scala-isolated-slick-example/test.mv.db [1.4.196/7] + at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765) + at org.h2.mvstore.FileStore.open(FileStore.java:168) + at org.h2.mvstore.MVStore.(MVStore.java:347) + ... 35 more +Caused by: java.nio.channels.OverlappingFileLockException + at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229) + at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123) + at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154) + at org.h2.store.fs.FileNio.tryLock(FilePathNio.java:121) + at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165) + at org.h2.mvstore.FileStore.open(FileStore.java:165) + ... 36 more diff --git a/test/controller/FunctionalSpec.scala b/test/controller/FunctionalSpec.scala new file mode 100644 index 0000000..9e1b89f --- /dev/null +++ b/test/controller/FunctionalSpec.scala @@ -0,0 +1,21 @@ +package controller + +import org.scalatestplus.play.{BaseOneAppPerSuite, PlaySpec} +import play.api.test.FakeRequest +import play.api.test.Helpers._ + +/** + * Runs a functional test with the application, using an in memory + * database. Migrations are handled automatically by play-flyway + */ +class FunctionalSpec extends PlaySpec with BaseOneAppPerSuite with MyApplicationFactory { + + "HomeController" should { + + "work with in memory h2 database" in { + val future = route(app, FakeRequest(GET, "/")).get + contentAsString(future) must include("myuser@example.com") + } + } + +} diff --git a/test/controller/MyApplicationFactory.scala b/test/controller/MyApplicationFactory.scala new file mode 100644 index 0000000..6dc7661 --- /dev/null +++ b/test/controller/MyApplicationFactory.scala @@ -0,0 +1,45 @@ +package controller + +import java.util.Properties + +import com.google.inject.Inject +import org.flywaydb.core.Flyway +import org.flywaydb.core.internal.jdbc.DriverDataSource +import org.scalatestplus.play.FakeApplicationFactory +import play.api.inject.guice.GuiceApplicationBuilder +import play.api.inject.{Binding, Module} +import play.api.{Application, Configuration, Environment} + +/** + * Set up an application factory that runs flyways migrations on in memory database. + */ +trait MyApplicationFactory extends FakeApplicationFactory { + def fakeApplication(): Application = { + new GuiceApplicationBuilder() + .configure(Map("myapp.database.url" -> "jdbc:h2:mem:test;DB_CLOSE_DELAY=-1")) + .bindings(new FlywayModule) + .build() + } +} + +class FlywayModule extends Module { + override def bindings(environment: Environment, configuration: Configuration): Seq[Binding[_]] = { + Seq(bind[FlywayMigrator].toSelf.eagerly() ) + } +} + +class FlywayMigrator @Inject()(env: Environment, configuration: Configuration) { + def onStart(): Unit = { + val driver = configuration.get[String]("myapp.database.driver") + val url = configuration.get[String]("myapp.database.url") + val user = configuration.get[String]("myapp.database.user") + val password = configuration.get[String]("myapp.database.password") + Flyway.configure() + .dataSource(new DriverDataSource(env.classLoader, driver, url, user, password, new Properties())) + .locations("filesystem:modules/flyway/src/main/resources/db/migration") + .load() + .migrate() + } + + onStart() +}