I've written a simple Java server. The basic idea is that, upon clicking a button, a servlet will load some data into MongoDB.
However, whenever I try to actually load something into MongoDB (in my case, saving a collection), I get the following error:
com.mongodb.MongoException$Network: can't call something : /127.0.0.1:27017/
com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:295)
com.mongodb.DBTCPConnector.call(DBTCPConnector.java:257)
com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:310)
com.mongodb.DB.command(DB.java:274)
com.mongodb.DB.command(DB.java:256)
com.mongodb.DB.command(DB.java:313)
com.mongodb.DB.command(DB.java:211)
com.mongodb.DB.createCollection(DB.java:170)
servlets.ImportData.doPost(ImportData.java:60)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
Does anyone know what the issue here might be? When I searched this problem I found people guessing at everything from port conflicts to stale connections to incorrect installation of MongoDB, so it would be fantastic to get some clarity on this one.
If it helps to see the source code, I'd be more than happy to share it.
Thanks in advance!