Details
Description
When MockMongoFactory fails for whatever reason, the logs do not show an error unless log4J is configured and INFO is logged. This is not the case for a standard "mvn clean install" so all you see is this:
> java.lang.NullPointerException: null
> at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191)
> at org.apache.rya.mongodb.MongoDBRdfConfiguration.setMongoClient( MongoDBRdfConfiguration.java:267) ...
Change it so that it always shows an error that contains some indication of the root cause – even if it says that mongodb failed to initialize, better would be to show the mongdb output, like below.
This should be in the [ERROR] log, not the [INFO]
2017-08-31 14:24:48,466 INFO [Thread-3] mongodb.MockMongoFactory (Slf4jLevel.java:log(42)) -
[initandlisten] terminate() called. An exception is active; attempting to gather more information[mongod output]
[initandlisten] std::exception::what(): Resource temporarily unavailable[mongod output]
Actual exception type: std::system_error[mongod output]