Versão atual:

[Play Framework] Erro utilizando Spring, Play Framework, Hibernate e MySql

Estou a muito tempo tentando rodar a arquitetura play-spring-hibernate porém toda vez que tento da o seguinte erro:

[info] Compiling 2 Java sources to C:\Users\Minhoca\Desktop\sistem\target\scala-
2.10\classes...
[info] play - database [default] connected at jdbc:h2:db
[info] play - Application started (Dev)
Hibernate: select bar0_.id as id0_, bar0_._ebean_intercept as column2_0_, bar0_.
name as name0_ from Bar bar0_
Uncaught error from thread [play-akka.actor.default-dispatcher-4] shutting down
JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[play]
java.lang.ExceptionInInitializerError
        at play.data.Form.bind(Form.java:321)
[ERROR] [10/01/2014 17:10:15.168] [play-akka.actor.default-dispatcher-4] [ActorS
ystem(play)] Uncaught error from thread [play-ak        at play.data.Form.bindFr
omRequest(Form.java:216)
ka.actor.default-dispatcher-4] shutting down JVM since 'akka.jvm-exit-on-fatal-e
rror' is enabled
        at controllers.Application.addBar(Application.java:23)
java.lang.ExceptionInInitializerError
        at Routes$$anonfun$routes$1$$anonfun$applyOrElse$3$$anonfun$apply$7.appl
y(routes_routing.scala:73)
        at play.data.Form.bind(Form.java:321)
        at Routes$$anonfun$routes$1$$anonfun$applyOrElse$3$$anonfun$apply$7.appl
y(routes_routing.scala:73)
        at play.data.Form.bindFromRequest(Form.java:216)
        at play.core.Router$HandlerInvoker$$anon$7$$anon$2.invocation(Router.sca
la:183)
        at controllers.Application.addBar(Application.java:23)
        at play.core.Router$Routes$$anon$1.invocation(Router.scala:377)
        at Routes$$anonfun$routes$1$$anonfun$applyOrElse$3$$anonfun$apply$7.appl
y(routes_routing.scala:73)
        at play.core.j.JavaAction$$anon$1.call(JavaAction.scala:56)
        at Routes$$anonfun$routes$1$$anonfun$applyOrElse$3$$anonfun$apply$7.appl
y(routes_routing.scala:73)
        at play.GlobalSettings$1.call(GlobalSettings.java:64)
        at play.core.Router$HandlerInvoker$$anon$7$$anon$2.invocation(Router.sca
la:183)
        at play.core.j.JavaAction$$anon$3.apply(JavaAction.scala:91)
        at play.core.Router$Routes$$anon$1.invocation(Router.scala:377)
        at play.core.j.JavaAction$$anon$3.apply(JavaAction.scala:90)
        at play.core.j.JavaAction$$anon$1.call(JavaAction.scala:56)
        at play.core.j.FPromiseHelper$$anonfun$flatMap$1.apply(FPromiseHelper.sc
ala:82)
        at play.GlobalSettings$1.call(GlobalSettings.java:64)
        at play.core.j.FPromiseHelper$$anonfun$flatMap$1.apply(FPromiseHelper.sc
ala:82)
        at play.core.j.JavaAction$$anon$3.apply(JavaAction.scala:91)
        at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:251)
        at play.core.j.JavaAction$$anon$3.apply(JavaAction.scala:90)
        at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:249)
        at play.core.j.FPromiseHelper$$anonfun$flatMap$1.apply(FPromiseHelper.sc
ala:82)
        at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
        at play.core.j.FPromiseHelper$$anonfun$flatMap$1.apply(FPromiseHelper.sc
ala:82)
        at play.core.j.HttpExecutionContext$$anon$2.run(HttpExecutionContext.sca
la:37)
        at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:251)
        at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:42)
        at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:249)
        at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(Abst
ractDispatcher.scala:386)
        at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
        at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
        at play.core.j.HttpExecutionContext$$anon$2.run(HttpExecutionContext.sca
la:37)
        at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool
.java:1339)
        at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:42)
        at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:19
79)
        at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(Abst
ractDispatcher.scala:386)
        at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThre
ad.java:107)
        at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
Caused by: java.lang.IllegalArgumentException: Type must not be null
        at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool
.java:1339)
        at org.springframework.util.Assert.notNull(Assert.java:112)
        at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:19
79)
        at org.springframework.core.convert.TypeDescriptor.valueOf(TypeDescripto
r.java:493)
        at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThre
ad.java:107)
        at org.springframework.format.support.FormattingConversionService$Printe
rConverter.<init>(FormattingConversionService.java:123)Caused by: java.lang.Ille
galArgumentException: Type must not be null

        at org.springframework.util.Assert.notNull(Assert.java:112)
        at org.springframework.format.support.FormattingConversionService.addFor
matterForFieldType(FormattingConversionService.java:80) at org.springframework.c
ore.convert.TypeDescriptor.valueOf(TypeDescriptor.java:493)

        at org.springframework.format.support.FormattingConversionService$Printe
rConverter.<init>(FormattingConversionService.java:123) at play.data.format.Form
atters.register(Formatters.java:204)

        at play.data.format.Formatters.<clinit>(Formatters.java:101)
        at org.springframework.format.support.FormattingConversionService.addFor
matterForFieldType(FormattingConversionService.java:80) ... 23 more

        at play.data.format.Formatters.register(Formatters.java:204)
        at play.data.format.Formatters.<clinit>(Formatters.java:101)
        ... 23 more

[error] a.a.ActorSystemImpl - Uncaught error from thread [play-akka.actor.defaul
t-dispatcher-4] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enable
d
java.lang.ExceptionInInitializerError: null
        at play.data.Form.bind(Form.java:321) ~[play-java_2.10.jar:2.2.4]
        at play.data.Form.bindFromRequest(Form.java:216) ~[play-java_2.10.jar:2.
2.4]
        at controllers.Application.addBar(Application.java:23) ~[classes/:na]
        at Routes$$anonfun$routes$1$$anonfun$applyOrElse$3$$anonfun$apply$7.appl
y(routes_routing.scala:73) ~[classes/:na]
        at Routes$$anonfun$routes$1$$anonfun$applyOrElse$3$$anonfun$apply$7.appl
y(routes_routing.scala:73) ~[classes/:na]
        at play.core.Router$HandlerInvoker$$anon$7$$anon$2.invocation(Router.sca
la:183) ~[play_2.10.jar:2.2.4]
Caused by: java.lang.IllegalArgumentException: Type must not be null
        at org.springframework.util.Assert.notNull(Assert.java:112) ~[spring-cor
e-4.0.0.RELEASE.jar:4.0.0.RELEASE]
        at org.springframework.core.convert.TypeDescriptor.valueOf(TypeDescripto
r.java:493) ~[spring-core-4.0.0.RELEASE.jar:4.0.0.RELEASE]
        at org.springframework.format.support.FormattingConversionService$Printe
rConverter.<init>(FormattingConversionService.java:123) ~[spring-context-4.0.0.R
ELEASE.jar:4.0.0.RELEASE]
        at org.springframework.format.support.FormattingConversionService.addFor
matterForFieldType(FormattingConversionService.java:80) ~[spring-context-4.0.0.R
ELEASE.jar:4.0.0.RELEASE]
        at play.data.format.Formatters.register(Formatters.java:204) ~[play-java
_2.10.jar:2.2.4]
        at play.data.format.Formatters.<clinit>(Formatters.java:101) ~[play-java
_2.10.jar:2.2.4]

Já tentei reconfigurar e reconfigurar muitas vezes.

Será que é alguma dependência que estou errando?

Existe algum problema relatado com esta arquitetura?

Estou utilizando o exemplo deixado também no site do play:

https://github.com/jamesward/play2bars/tree/java-spring

tive que modificar as dependências do projeto para rodar.

Mas quando faço uma requisição ele sempre, no momento em que chamo o método Form form = Form.form(Bar.class).bindFromRequest() ele gera o erro postado.




import sbt._
import Keys._
import play.Project._

object ApplicationBuild extends Build {

    val appName         = "play2bars-java-spring"
    val appVersion      = "1.0-SNAPSHOT"

    val appDependencies = Seq(
      javaCore,
      "com.h2database" % "h2" % "1.3.168",
      "org.springframework" % "spring-core" % "4.0.0.RELEASE",
      "org.springframework" % "spring-expression" % "4.0.0.RELEASE",
      "org.springframework" % "spring-context" % "4.0.0.RELEASE",
      "org.springframework" % "spring-orm" % "4.0.0.RELEASE",
      "org.springframework" % "spring-jdbc" % "4.0.0.RELEASE",
      "org.springframework" % "spring-tx" % "4.0.0.RELEASE",
      "org.springframework" % "spring-test" % "4.0.0.RELEASE" % "test",
      "org.hibernate" % "hibernate-entitymanager" % "4.1.9.Final",
      "cglib" % "cglib" % "2.2.2"
    )

    val main = play.Project(appName, appVersion, appDependencies).settings(
      // Add your own project settings here      
    )

}

Versão(1):

Ver a versão formatada

[Play Framework] Erro utilizando Spring, Play Framework, Hibernate e MySql

Comentário

new question