[2.0] Cannot register class in Ebean server - how to debug

1,841 views
Skip to first unread message

Thomas Koeppen

unread,
Feb 4, 2012, 6:39:26 PM2/4/12
to play-framework
Hi everybody,

After "play run" we get several non-reproducable errors, for example [1]:
Configuration error [Cannot register class [models.Order] in Ebean server]

No code change was made, just restarted play and then we got this error.

Workaround is stop play, "play clean compile" and "play run".

What is the recommended way to debug play and ebean itself to see what happens behind the scenes?

Kind regards,
Thomas

[1] [error] application -

! @69a4o42lg - Internal server error, for request [GET /] ->

play.api.Configuration$$anon$1: Configuration error [Cannot register class [models.Order] in Ebean server]
    at play.api.Configuration$.play$api$Configuration$$configError(Configuration.scala:70) ~[play_2.9.1.jar:2.0-RC1-SNAPSHOT]
    at play.api.Configuration.reportError(Configuration.scala:257) ~[play_2.9.1.jar:2.0-RC1-SNAPSHOT]
    at play.Configuration.reportError(Configuration.java:119) ~[play_2.9.1.jar:2.0-RC1-SNAPSHOT]
    at play.db.ebean.EbeanPlugin.onStart(EbeanPlugin.java:70) ~[play_2.9.1.jar:2.0-RC1-SNAPSHOT]
    at play.api.Play$$anonfun$start$1.apply(Play.scala:60) ~[play_2.9.1.jar:2.0-RC1-SNAPSHOT]
    at play.api.Play$$anonfun$start$1.apply(Play.scala:60) ~[play_2.9.1.jar:2.0-RC1-SNAPSHOT]
Caused by: java.lang.VerifyError: (class: models/Order, method: toJson signature: ()Lcontrollers/Orders$OrderJson;) Incompatible object argument for function call
    at java.lang.Class.forName0(Native Method) ~[na:1.6.0_29]
    at java.lang.Class.forName(Class.java:247) ~[na:1.6.0_29]
    at play.db.ebean.EbeanPlugin.onStart(EbeanPlugin.java:68) ~[play_2.9.1.jar:2.0-RC1-SNAPSHOT]
    at play.api.Play$$anonfun$start$1.apply(Play.scala:60) ~[play_2.9.1.jar:2.0-RC1-SNAPSHOT]
    at play.api.Play$$anonfun$start$1.apply(Play.scala:60) ~[play_2.9.1.jar:2.0-RC1-SNAPSHOT]
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59) ~[scala-library.jar:0.11.2]

werner hoffmann

unread,
Jan 22, 2013, 4:17:27 PM1/22/13
to play-fr...@googlegroups.com, tkoeppe...@gmail.com, tkoeppe...@googlemail.com
same problem here.
Described Workaround does not work.

Do you have any solutions for me? Where to look for the bug?
Wrong configuration in database?

simon VACHER

unread,
Apr 2, 2013, 4:47:43 AM4/2/13
to play-fr...@googlegroups.com, tkoeppe...@gmail.com, tkoeppe...@googlemail.com
Hi !
We are experiencing the same problem here .... Does anyone have a solution please ?
Thanks in advance !

Ömer Faruk Gül

unread,
May 27, 2013, 4:18:53 PM5/27/13
to play-fr...@googlegroups.com, tkoeppe...@gmail.com, tkoeppe...@googlemail.com
Have anyone found a solution to this? I am about to abonden play2 beacuse of this "magical" problems.

Hamilton Lima

unread,
Jul 11, 2013, 11:02:08 PM7/11/13
to play-fr...@googlegroups.com
got the same issue but the : clean / compile didn't work :\

alex s

unread,
Jul 12, 2013, 3:29:21 AM7/12/13
to play-fr...@googlegroups.com


пятница, 12 июля 2013 г., 7:02:08 UTC+4 пользователь Hamilton Lima написал:
got the same issue but the : clean / compile didn't work :\

Stack trace?

Ömer Faruk Gül

unread,
Jul 12, 2013, 7:32:01 AM7/12/13
to play-fr...@googlegroups.com

Well, in my case I didn't have setters and getters for all the properties of my model.

The solution was to define a setter and a getter for the "id" property and always use object.getId() instead of object.id

Maybe that could help.

Ashesh Ambasta

unread,
Oct 21, 2015, 8:41:51 AM10/21/15
to play-framework, tkoeppe...@gmail.com, tkoeppe...@googlemail.com
This is still a problem in 2.4.x and which is why we're moving away from Play Framework and replacing services written in it in production.

Erol Merdanović

unread,
Oct 21, 2015, 2:01:23 PM10/21/15
to play-framework, tkoeppe...@gmail.com, tkoeppe...@googlemail.com
Afaik, Play will automatically generate setters and getters. Have you tried defining them manually? In my case, clean and rerun solves the problem.
Reply all
Reply to author
Forward
0 new messages