Java 部署时的MongoDB问题

Java 部署时的MongoDB问题,java,mongodb,Java,Mongodb,我对MongoDB相当陌生:我在mac上运行的应用程序在ubuntu上部署不好 我有一个非常基本的程序,它接受一个JSon文件并将其转储到MongoDB中。MongoDB位于名为db的远程Ubuntu服务器上 该程序在我的Mac电脑、Eclipse和命令行上运行良好 当我在基于Ubuntu的应用服务器(不同于db服务器)上部署它时,我得到: 应用程序服务器可以ping数据库服务器。我想这是因为我的应用程序正在尝试将null对象保存为文档 [cluster-ClusterId{value='572

我对MongoDB相当陌生:我在mac上运行的应用程序在ubuntu上部署不好

我有一个非常基本的程序,它接受一个JSon文件并将其转储到MongoDB中。MongoDB位于名为
db
的远程Ubuntu服务器上

该程序在我的Mac电脑、Eclipse和命令行上运行良好

当我在基于Ubuntu的应用服务器(不同于db服务器)上部署它时,我得到:

应用程序服务器可以ping数据库服务器。

我想这是因为我的应用程序正在尝试将
null
对象保存为文档

[cluster-ClusterId{value='572387cf96720e25144dce5b', description='null'}-db:27017] INFO org.mongodb.driver.cluster - Exception in monitor thread while connecting to server db:27017
com.mongodb.MongoInterruptedException: Interrupted acquiring a permit to retrieve an item from the pool