Unexpected exception[ExceptionInInitializerError: null]

145 views
Skip to first unread message

egor.k...@gmail.com

unread,
Jun 11, 2013, 5:03:23 AM6/11/13
to circumfl...@googlegroups.com
I've set up very simple play application. And when I try to save entity I get this error:

play.api.UnexpectedException: Unexpected exception[ExceptionInInitializerError: null]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$1.apply(ApplicationProvider.scala:146) ~[play_2.10.jar:2.1.1]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$1.apply(ApplicationProvider.scala:106) ~[play_2.10.jar:2.1.1]
at scala.Option.map(Option.scala:145) ~[scala-library.jar:na]
at play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:106) ~[play_2.10.jar:2.1.1]
at play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:104) ~[play_2.10.jar:2.1.1]
at scala.util.Either$RightProjection.flatMap(Either.scala:523) [scala-library.jar:na]
Caused by: java.lang.ExceptionInInitializerError: null
at model.Country.relation(Country.scala:16) ~[na:na]
at model.Country.relation(Country.scala:11) ~[na:na]
at pro.savant.circumflex.orm.Record.validate(record.scala:192) ~[circumflex-orm-3.0-RC1.jar:na]
at pro.savant.circumflex.orm.Record.validate_$bang(record.scala:198) ~[circumflex-orm-3.0-RC1.jar:na]
at pro.savant.circumflex.orm.Record.save(record.scala:213) ~[circumflex-orm-3.0-RC1.jar:na]
at model.Country.<init>(Country.scala:23) ~[na:na]
Caused by: java.lang.ClassNotFoundException: model.Country
at java.net.URLClassLoader$1.run(URLClassLoader.java:366) ~[na:1.7.0_21]
at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[na:1.7.0_21]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_21]
at java.net.URLClassLoader.findClass(URLClassLoader.java:354) ~[na:1.7.0_21]
at java.lang.ClassLoader.loadClass(ClassLoader.java:423) ~[na:1.7.0_21]
at java.lang.ClassLoader.loadClass(ClassLoader.java:356) ~[na:1.7.0_21]

- scala 2.10. 
- circumflex orm version: "pro.savant.circumflex" % "circumflex-orm" % "3.0-RC1".
- my model: 
import pro.savant.circumflex.orm.{Table, Record}

class Country extends Record[String, Country] {
  val code = "code".VARCHAR(2).NOT_NULL
  val name = "name".TEXT.NOT_NULL

  def PRIMARY_KEY = code
  def relation = Country

  def this(code: String, name: String) = {
    this()
    this.code.set(code)
    this.name.set(name)

    save
  }
}

object Country extends Country with Table[String, Country]


I think I miss something very basic about circumflex, and it can be easily resolved.


Reply all
Reply to author
Forward
0 new messages