java.lang.IllegalArgumentException: No match for read preference of primaryPreferred

JIRA | Bryan Reinero | 1 year 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.

Root Cause Analysis

  1. java.lang.IllegalArgumentException

    No match for read preference of primaryPreferred

    at com.mongodb.ReadPreference.valueOf()
  2. MongoDB Java Driver
    ReadPreference.valueOf
    1. com.mongodb.ReadPreference.valueOf(ReadPreference.java:237)
    1 frame