java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to org.bson.conversions.Bson

Stack Overflow | AdolfoV | 7 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Translate new mongodb 3 aggregate java syntax to groovy

    Stack Overflow | 7 months ago | AdolfoV
    java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to org.bson.conversions.Bson

    Root Cause Analysis

    1. java.lang.ClassCastException

      java.util.LinkedHashMap cannot be cast to org.bson.conversions.Bson

      at com.mongodb.AggregateIterableImpl.createBsonDocumentList()
    2. MongoDB Java Driver
      AggregateIterableImpl.iterator
      1. com.mongodb.AggregateIterableImpl.createBsonDocumentList(AggregateIterableImpl.java:156)
      2. com.mongodb.AggregateIterableImpl.execute(AggregateIterableImpl.java:126)
      3. com.mongodb.AggregateIterableImpl.iterator(AggregateIterableImpl.java:102)
      3 frames