com.mongodb.CommandFailureException: { "serverUsed" : "localhost/127.0.0.1:27017" , "errmsg" : "exception: invalid operator '$sum'" , "code" : 15999 , "ok" : 0.0}

Stack Overflow | Betty | 9 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    group and sum in aggregation with MongoDB Java Driver

    Stack Overflow | 9 months ago | Betty
    com.mongodb.CommandFailureException: { "serverUsed" : "localhost/127.0.0.1:27017" , "errmsg" : "exception: invalid operator '$sum'" , "code" : 15999 , "ok" : 0.0}
  2. 0

    MongoDB: Usage of function "mod()" in SQL query throws an exception

    https://bugzilla.redhat.com/bugzilla/ | 3 years ago | Filip Elias
    com.mongodb.CommandFailureException: { "serverUsed" : "localhost/127.0.0.1:27017" , "errmsg" : "exception: disallowed field type Array in object expression (at 'mod')" , "code" : 15992 , "ok" : 0.0}

    Root Cause Analysis

    1. com.mongodb.CommandFailureException

      { "serverUsed" : "localhost/127.0.0.1:27017" , "errmsg" : "exception: invalid operator '$sum'" , "code" : 15999 , "ok" : 0.0}

      at com.mongodb.CommandResult.getException()
    2. MongoDB Java Driver
      DBCollection.aggregate
      1. com.mongodb.CommandResult.getException(CommandResult.java:71)
      2. com.mongodb.CommandResult.throwOnError(CommandResult.java:110)
      3. com.mongodb.DBCollection.aggregate(DBCollection.java:1308)
      3 frames