Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8096815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:34:01+00:00 2026-06-05T21:34:01+00:00

I keep getting this error with my Play 2.0 application: play.core.ActionInvoker$$anonfun$receive$1$$anon$1: Execution exception [[MatchError:

  • 0

I keep getting this error with my Play 2.0 application:

play.core.ActionInvoker$$anonfun$receive$1$$anon$1: Execution exception [[MatchError: 4f7f4ae4251735803a942b2c (of class org.bson.types.ObjectId)]]
    at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:82) [play_2.9.1.jar:2.0]
    at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:63) [play_2.9.1.jar:2.0]
    at akka.actor.Actor$class.apply(Actor.scala:290) [akka-actor.jar:2.0]
    at play.core.ActionInvoker.apply(Invoker.scala:61) [play_2.9.1.jar:2.0]
    at akka.actor.ActorCell.invoke(ActorCell.scala:617) [akka-actor.jar:2.0]
    at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:179) [akka-actor.jar:2.0]
Caused by: scala.MatchError: 4f7f4ae4251735803a942b2c (of class org.bson.types.ObjectId)
    at com.novus.salat.transformers.in.LongToInt$class.transform(Injectors.scala:216) ~[salat-core_2.9.1-0.0.8-SNAPSHOT.jar:0.0.8-SNAPSHOT]
    at com.novus.salat.transformers.in.package$$anon$31.transform(Injectors.scala:180) ~[salat-core_2.9.1-0.0.8-SNAPSHOT.jar:0.0.8-SNAPSHOT]
    at com.novus.salat.transformers.Transformer$$anonfun$transform_$bang$1.apply(Transformer.scala:71) ~[salat-core_2.9.1-0.0.8-SNAPSHOT.jar:0.0.8-SNAPSHOT]
    at com.novus.salat.transformers.Transformer$$anonfun$transform_$bang$1.apply(Transformer.scala:71) ~[salat-core_2.9.1-0.0.8-SNAPSHOT.jar:0.0.8-SNAPSHOT]
    at scala.Option.flatMap(Option.scala:146) ~[scala-library.jar:0.11.2]
    at com.novus.salat.transformers.Transformer.transform_$bang(Transformer.scala:71) ~[salat-core_2.9.1-0.0.8-SNAPSHOT.jar:0.0.8-SNAPSHOT]

My model is very simple and I use SalatDao-flavored DB access:

case class Gossip(@Key("_id") id: org.bson.types.ObjectId, title: String, link: String, description: String, permalink: String,
                  image: String, date: String) {}
object GossipDAO extends SalatDAO[Gossip, ObjectId](
  collection = MongoConnection()("gossips")("items"))

The error is thrown when I call this:

val gossips = GossipDAO.find(ref = MongoDBObject("modificationDate" -> MongoDBObject("$gte" -> startDate))).toList

I’ve loaded data to my MongoDB via some other script, and they seem to be OK, since I’m able to find them in MongoDB shell with:

 db.items.find({_id:ObjectId("4f7f4ae4251735803a942b2c")})

What’s more if I change the startDate condition so as no objects match it, my code runs fine. This indicates that the query is correct but the transformation from MongoDBObject to Scala’s Gossip class fails.

Is there something wrong with the above code?

UPDATE

  • My dependencies are only this:

    val appDependencies = Seq(
    “com.mongodb.casbah” %% “casbah” % “2.1.5-1”,
    “com.novus” %% “salat-core” % “0.0.8-SNAPSHOT”
    )

  • I use ‘modificationDate’, because it is a field in the mongoDB collection object.

  • When I execute db.items.find({_id:ObjectId(“4f7f4ae4251735803a942b2c”)}) I get this:

https://gist.github.com/2928862

  • if you simply fetch the whole collection, are same kind of problem happening?

I don’t know how to fetch all objects with salat DAO. But when I had my case class without ‘id’ key, I was able to do just db.find() on MongoConnection and it would return all the available objects and convert them into Model objects. The same solution, when I’ve added ‘id’ key produced the same error as above.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T21:34:03+00:00Added an answer on June 5, 2026 at 9:34 pm

    Well, it seems that deleting ‘target’ directory and running Play20 again solved the issue. Must have been some old classes info in there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I keep getting this error in my application and can't figure out what it
I keep getting this error when I deploy my application in the server machine
i keep getting this error: Exception Details: System.NotSupportedException: Cannot serialize member HannaPrintsDataAccess.Customer.CustomerAddresses of type
Keep getting this error after inserting a subdatasheet into a query and trying to
I keep getting this error on emulator: I copied this from a tutorial and
I keep getting this error Error in readPNG(destfile) : libpng error: PLTE: CRC error
I keep getting this error when using django templates in Google App Engine: TemplateSyntaxError:
I keep getting this error in the $('#savetickets-list') line. I want to dynamically add
I keep getting this error System.Web.HttpException was unhandled by user code Message=Validation of viewstate
I keep getting this error when I try to commit a group of executed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.