java.lang.IllegalArgumentException

tip

This happened when I tried to insert an empty list of elements to a MongoDB collection.


poroszd

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Jackson Serialize Map to List
    via Stack Overflow by user1236874
    ,
  • save and find json string in mongodb
    via Stack Overflow by Mike Dynamite
    ,
    • java.lang.IllegalArgumentException: BasicBSONList can only work with numeric keys, not: [_id][info] at org.bson.types.BasicBSONList._getInt(BasicBSONList.java:161)[info] at org.bson.types.BasicBSONList._getInt(BasicBSONList.java:152)[info] at org.bson.types.BasicBSONList.get(BasicBSONList.java:104)[info] at com.mongodb.DBCollection.apply(DBCollection.java:767)[info] at com.mongodb.DBCollection.apply(DBCollection.java:756)[info] at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:220)[info] at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:204)[info] at com.mongodb.DBCollection.insert(DBCollection.java:76)[info] at com.mongodb.casbah.MongoCollectionBase$class.insert(MongoCollection.scala:508)[info] at com.mongodb.casbah.MongoCollection.insert(MongoCollection.scala:866)

    Users with the same issue

    Unknown visitor1 times, last one,
    rp
    1 times, last one,
    reni
    1 times, last one,
    poroszd
    2 times, last one,
    Unknown visitor1 times, last one,
    4 more bugmates