0

I am trying to connect to remote MongoDB (mongolab) from my local GAE server (localhost/8888). I am using morphia and my mongodb driver version is 2.4. My code looks like this:

Mongo m = new Mongo("xyz.mongolab.com",);

Datastore datastore = new Morphia().createDatastore(m, "staging","uname","password".toCharArray());

This throws the following exception :

com.mongodb.MongoInternalException: DBPort.findOne failed at com.mongodb.DBPort.findOne(DBPort.java:153) at com.mongodb.DBPort.runCommand(DBPort.java:159) at com.mongodb.DBTCPConnector.testMaster(DBTCPConnector.java:371) at com.mongodb.Mongo.(Mongo.java:167)

Caused by: java.io.IOException: couldn't connect to [xyz.mongolab.com/:] bc:java.net.SocketException: Operation failure: setSocketOptions: Not yet implemented at com.mongodb.DBPort._open(DBPort.java:205)

Does somebody know why this is happening ?

sharath
  • 3,501
  • 9
  • 47
  • 72
  • java driver version 2.4? this is pretty old .. have you tried to use a newer version? – Miguel Cartagena Jul 06 '13 at 00:03
  • Guess that was the problem. But tried 2.10.1 and now I am facing this problem : java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:376) at java.security.AccessController.checkPermission(AccessController.java:549) at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) – sharath Jul 06 '13 at 00:30
  • Do you have authentication enabled on that server? – Trisha Aug 11 '13 at 09:45

1 Answers1

0

it was a problem with using the old mongodb driver.. works after i upgraded..

sharath
  • 3,501
  • 9
  • 47
  • 72