Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnexpectedException: Unexpected exception[ExceptionInInitializerError: null] #64

Closed
odwrotnie opened this issue Jul 2, 2013 · 1 comment

Comments

@odwrotnie
Copy link
Contributor

I get play.api.UnexpectedException: Unexpected exception[ExceptionInInitializerError: null] after play new, adding slick.default="models.*" to application.conf and creating the model:

package models

import play.api.db.slick.Config.driver._

case class Cat(name: String, color: String)

object Cats extends Table[Cat]("CAT") {

  def name = column[String]("name", O.PrimaryKey)
  def color = column[String]("color", O.NotNull)

  def * = name ~ color <> (Cat.apply _, Cat.unapply _)
}
@odwrotnie
Copy link
Contributor Author

You have to add:

db.default.driver=org.h2.Driver
db.default.url="jdbc:h2:mem:play"
db.default.user=sa
db.default.password=""

to application.conf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant