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

  1. ,

    Use replaceOne instead of updateOne

Solutions on the web

via Google Groups by Vivek YS, 1 year ago
Update document keys must start with $: _id
via Google Groups by miki haiat, 1 year ago
via Stack Overflow by Unknown author, 2 years ago
Update document keys must start with $: _id
java.lang.IllegalArgumentException: Update document keys must start with $: _id	at com.mongodb.DBCollectionImpl$Run.executeUpdates(DBCollectionImpl.java:769)	at com.mongodb.DBCollectionImpl$Run.execute(DBCollectionImpl.java:734)	at com.mongodb.DBCollectionImpl.executeBulkWriteOperation(DBCollectionImpl.java:149)	at com.mongodb.DBCollection.executeBulkWriteOperation(DBCollection.java:1737)	at com.mongodb.DBCollection.executeBulkWriteOperation(DBCollection.java:1733)	at com.mongodb.BulkWriteOperation.execute(BulkWriteOperation.java:93)	at com.mongodb.casbah.BulkWriteOperation$$anonfun$1.apply(BulkWriteOperation.scala:71)	at com.mongodb.casbah.BulkWriteOperation$$anonfun$1.apply(BulkWriteOperation.scala:71)	at scala.util.Try$.apply(Try.scala:161)	at com.mongodb.casbah.BulkWriteOperation.execute(BulkWriteOperation.scala:71)