Deprecated: Assigning the return value of new by reference is deprecated in /usr/share/php/HTML/Menu.php on line 228

Strict Standards: Declaration of HTML_Menu3::_findNodeType() should be compatible with HTML_Menu::_findNodeType($nodeId, &$nodeUrl, $level) in /var/www/wi-fizzle.com/lib/HTML/Menu3.php on line 49
Wi-Fizzle.com | Jerkson/Jackson JSON deserialization issues w/ Play 2.0.4
Wi-Fizzle.com - Putting the fizzle in Wi-Fi since 2005 .. (yes, this was a poor choice for a domain name)

<div class="news_item">#464<div class="news_title">Jerkson/Jackson JSON deserialization issues w/ Play 2.0.4

Posted by dandriff on Friday October 05, 2012@03:06PM

I ran into this nasty exception again today:

 play.api.Application$$anon$1: Execution exception [[ParsingException: Unable to find a case accessor for com.company.models.CombinedMessage]]
     at play.api.Application.handleError(Application.scala:144) ~[play_2.9.1-2.1-07132012.jar:2.1-07132012]
     at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:121) [play_2.9.1-2.1-07132012.jar:2.1-07132012]
     at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:108) [play_2.9.1-2.1-07132012.jar:2.1-07132012]
     at akka.actor.Actor$class.apply(Actor.scala:318) [akka-actor.jar:2.0.2]
     at play.core.ActionInvoker.apply(Invoker.scala:106) [play_2.9.1-2.1-07132012.jar:2.1-07132012]
     at akka.actor.ActorCell.invoke(ActorCell.scala:626) [akka-actor.jar:2.0.2]
     at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:197) [akka-actor.jar:2.0.2]
     at akka.dispatch.Mailbox.run(Mailbox.scala:179) [akka-actor.jar:2.0.2]
     at akka.dispatch.ForkJoinExecutorConfigurator$MailboxExecutionTask.exec(AbstractDispatcher.scala:516) [akka-actor.jar:2.0.2]
     at akka.jsr166y.ForkJoinTask.doExec(ForkJoinTask.java:259) [akka-actor.jar:2.0.2]
     at akka.jsr166y.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:975) [akka-actor.jar:2.0.2]
     at akka.jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1479) [akka-actor.jar:2.0.2]
     at akka.jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104) [akka-actor.jar:2.0.2]

Caused by: com.codahale.jerkson.ParsingException: Unable to find a case accessor for com.company.models.CombinedMessage
     at com.codahale.jerkson.ParsingException$.apply(ParsingException.scala:17) ~[jerkson_2.9.1.jar:na]
     at com.codahale.jerkson.Parser$class.parse(Parser.scala:86) ~[jerkson_2.9.1.jar:na]
     at com.codahale.jerkson.Json$.parse(Json.scala:6) ~[jerkson_2.9.1.jar:na]
     at com.codahale.jerkson.Parser$class.parse(Parser.scala:14) ~[jerkson_2.9.1.jar:na]
     at com.codahale.jerkson.Json$.parse(Json.scala:6) ~[jerkson_2.9.1.jar:na]
     ...
 

An explanation of why this happens and how to remedy the problem is in this thread.

Keywords:
  • Play-framework 2.x
  • Play-framework 2.0.3
  • Play-framework 2.0.4
  • JSON
  • Jackson
  • Jerkson
  • "Unable to find a case accessor for"

Update 2012-10-11

This problem was filed with Jerkson back in June 2012. I have confirmed that this is still a problem in play 2.0.4.