Marcel, Thanks for the reply. I decided to try removing Mongo dependency from the pom.xml, and that made the exception go away. So that solved it for me.
However I don't think I had any of my own code that was trying to initialize mongo, so I don't know how it was attempting to run any mongo code at all. Unless some JCR is checking to see if it can fine Mongo on the classpath and if found, attempts to use it automatically? To answer your question here is the initialization code, but none of the mongo in it was enabled (running), because I had the RDB option in use instead: https://github.com/Clay-Ferguson/meta64/blob/master/src/main/java/com/meta64/mobile/repo/OakRepository.java Best regards, Clay Ferguson [email protected] On Mon, Jul 3, 2017 at 3:16 AM, Marcel Reutegger <[email protected]> wrote: > Hi Clay, > > can you please post the code you use to initialize the repository? > > Regards > Marcel > > On 02/07/17 18:42, Clay Ferguson wrote: > >> When I startup the JCR I am using RDBDataSourceFactory, and no Mongo >> whatsoever, however during initialization there is always a >> DefaultServerMonitor class that creates an inner class >> (ServerMonitorRunnable) which tries to connect to Mongo, and ends up >> throwing an exception, because there's no Mongo in use. >> >> Question: Is there a way to make the JCR stop assuming it should look >> for Mongo even in apps that aren't using Mongo ? >> >> Here's the actual exception that gets logged, during startup. Everything >> still works fine afaik, but the annoyance is that it's having that >> exception, when it really shouldn't be trying Mongo at all. >> >> com.mongodb.MongoSocketOpenException: Exception opening socket >> at com.mongodb.connection.SocketStream.open(SocketStream.java:63) >> ~[mongo-java-driver-3.4.2.jar:na] >> at >> com.mongodb.connection.InternalStreamConnection.open(Interna >> lStreamConnection.java:115) >> ~[mongo-java-driver-3.4.2.jar:na] >> at >> com.mongodb.connection.DefaultServerMonitor$ServerMonitorRun >> nable.run(DefaultServerMonitor.java:113) >> ~[mongo-java-driver-3.4.2.jar:na] >> at java.lang.Thread.run(Thread.java:748) [na:1.8.0_131] >> Caused by: java.net.ConnectException: Connection refused (Connection >> refused) >> at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_131] >> at >> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSock >> etImpl.java:350) >> ~[na:1.8.0_131] >> at >> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPl >> ainSocketImpl.java:206) >> ~[na:1.8.0_131] >> at >> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocket >> Impl.java:188) >> ~[na:1.8.0_131] >> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) >> ~[na:1.8.0_131] >> at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_131] >> at >> com.mongodb.connection.SocketStreamHelper.initialize(SocketS >> treamHelper.java:57) >> ~[mongo-java-driver-3.4.2.jar:na] >> at com.mongodb.connection.SocketStream.open(SocketStream.java:58) >> ~[mongo-java-driver-3.4.2.jar:na] >> ... 3 common frames omitted >> >> Best regards, >> Clay Ferguson >> [email protected] <mailto:[email protected]> >> >>
