java.util.NoSuchElementException: key not found: location

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips


Check if the field you try to read really exists in the database. If it is optional, just use com.mongodb.casbah.commons.MongoDBObject#getAs

Solutions on the web

java.util.NoSuchElementException: key not found: location
at scala.collection.MapLike$class.default(scratch_8.scala:224)
at scala.collection.AbstractMap.default(scratch_8.scala:54)
at scala.collection.MapLike$class.apply(scratch_8.scala:137)
at scala.collection.AbstractMap.apply(scratch_8.scala:54)

Users with the same issue

4 times, 3 weeks ago
Once, 3 weeks ago
2 times, 2 months ago
17 times, 6 months ago
3 times, 6 months ago
14 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.