com.mongodb.WriteConcernException: Write failed with error code 16836 and error message 'Cannot apply $pull to a non-array value'

Stack Overflow | aarish | 4 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

    Mongodb update query returns 'Cannot apply $pull to a non-array value'

    Stack Overflow | 4 months ago | aarish
    com.mongodb.WriteConcernException: Write failed with error code 16836 and error message 'Cannot apply $pull to a non-array value'

    Root Cause Analysis

    1. com.mongodb.WriteConcernException

      Write failed with error code 16836 and error message 'Cannot apply $pull to a non-array value'

      at com.mongodb.operation.BaseWriteOperation.convertBulkWriteException()
    2. MongoDB Java Driver
      BaseWriteOperation.convertBulkWriteException
      1. com.mongodb.operation.BaseWriteOperation.convertBulkWriteException(BaseWriteOperation.java:239)
      1 frame