title: Connecting to sharded mongo cluster from spring application
body: <p>I'm testing my spring application with a sharded mongo database. </p>
  
  <p><em>My config is:</em> </p>
  
  <pre><code>System-1 (Config server and Mongos)
  
  System-2 (Shard0000) [Standalone mongod instance, not a replica set]
  
  System-3 (Shard0001) [Standalone mongod instance, not a replica set]
  </code></pre>
  
  <p>In my tests I'm trying to take down one of the shards and check for consistency of data. My question is how do I configure the spring application. </p>
  
  <p>I've tried,</p>
  
  <pre><code>new SimpleMongoDbFactory(new MongoURI("mongodb://System-2,System-3/db-name"));
  </code></pre>
  
  <p>But I get the error </p>
  
  <pre><code>Expecting a single StandAlone, but found more than one.  Removing
  System-2:27017 from client view of cluster 
  </code></pre>
  
  <p>and  </p>
  
  <pre><code>Expecting a single StandAlone, but found more than one.  Removing
  System-3:27017 from client view of cluster.
  </code></pre>
  
  <p>How do I get the config right?</p>