This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Mar 29th, 2013  |  syntax: None  |  size: 0.60 KB  |  views: 57  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. mongodb://<dbuser>:<dbpassword>@ds041177.mongolab.com:41177/myclouddb
  2.        
  3. Mongo m = new Mongo();
  4.      com.mongodb.DBAddress dba=new DBAddress("mongodb://admin:password@ds041177.mongolab.com:41177/myclouddb");
  5.         m.connect(dba);
  6.        
  7. java.lang.NumberFormatException: For input string: ""
  8.        
  9. String textUri = "mongodb://admin:password@ds041177.mongolab.com:41177/myclouddb"
  10. MongoURI uri = new MongoURI(textUri)
  11. Mongo m = new Mongo(uri);
  12.        
  13. String textUri = "mongodb://admin:password@ds041177.mongolab.com:41177/myclouddb"
  14. MongoClientURI uri = new MongoClientURI(textUri)
  15. MongoClient m = new MongoClient(uri);
clone this paste RAW Paste Data