Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-1784

UpdateUser command does not work with the 3.0.0 driver and 3.x server

      I am using the 3.0.0 driver to issue the following command to the 3.0.2 server. The goal is to change the password.

      BasicDBObject doc = new BasicDBObject("updateUser", "1").
      append("updateUser", <USER>).
      append("pwd", <passwd>);
      .....
      private DB dbObj = null;
      ....
      this.dbObj.command(cmd);

      The command always fails with the following error -"The server is not the primary and did not execute the operation"

      The same command runs fine from the mongo shell.It also runs fine against a 2.6.x server. So basically it fails against a 3.x server.

            Assignee:
            ross@mongodb.com Ross Lawley
            Reporter:
            dharshanr@scalegrid.net Dharshan Rangegowda
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: