com.mongodb.MongoException

Can't canonicalize query: BadValue unknown top level operator: $query

Solutions on the web91

  • via JIRA by sandip, 1 year ago
    Can't canonicalize query: BadValue unknown top level operator: $query
  • via JIRA by sandip, 1 year ago
    Can't canonicalize query: BadValue unknown top level operator: $query
  • Can't canonicalize query: BadValue unknown top level operator: $ne
  • Stack trace

    • com.mongodb.MongoException: Can't canonicalize query: BadValue unknown top level operator: $query at com.mongodb.QueryResultIterator.throwOnQueryFailure(QueryResultIterator.java:214) at com.mongodb.QueryResultIterator.init(QueryResultIterator.java:198) at com.mongodb.QueryResultIterator.initFromQueryResponse(QueryResultIterator.java:176) at com.mongodb.QueryResultIterator.<init>(QueryResultIterator.java:64) at com.mongodb.DBCollectionImpl.find(DBCollectionImpl.java:86) at com.mongodb.DBCollectionImpl.find(DBCollectionImpl.java:66) at com.mongodb.DBCursor._check(DBCursor.java:458) at com.mongodb.DBCursor._hasNext(DBCursor.java:546) at com.mongodb.DBCursor.hasNext(DBCursor.java:571) at aap.main(aap.java:57)

    Write tip

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

    Users with the same issue

    Unknown user
    Once, 1 year ago
    2 times, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    2 more bugmates