Morphium 4.1.4 released

published : 2020-08-10 changed: 2020-08-10

category: Computer --> programming --> MongoDB --> morphium

We released Morphium 4.1.4. This includes, as usual a bunch of improvements and fixes. Here is the changelog since V4.1.0:


  • Morphium is AutoClosable now - simplifies usage
  • Checking for a field existence in sub documents was causing problems with aggregation. This was fixed and the output is only an error now, not exception thrown.
  • Improving the null handling: only overwrite a POJO value, when mongo delivers a value including null, keep it as default otherwise.
  • Replace morphium driver property acceptableLatencyDifference with localThreshold because only the latter exists in mongo driver; Additional morphium property serverSelectionTimeout


  • adding complexQueryCount to Query interfact and implementation
  • messaging now has a flag whether polling is necessary or not. This reduces load.
  • the stats now honor this flag
  • Bugfix: a little bug that caused unneccessary load in messaging
  • Bugfix: fixing a bug in messaging regarding pausing/unpausing with exclusive messages, reducing load on mongo from messaging, finall fixing log format
  • Bugfix: must not change read preference SECONDARY_PREFERRED to SECONDARY or reading from a cluster that only has a Primary(on node cluster) will fail
  • SSL/TLS Support for Morphium (tested with AWS DocumentDB)
  • Bugfix: fixing a bug in changestream monitor for the InMemoryDriver
  • Dump InMemory DBs


  • Bugfix: fixing changestream handling for InMemoryDriver, adapting tests
  • reducing write security for tests, making all work with enterprise mongo inMem
  • update of some dependent libs
  • code improvements, removed some unnecessary stuff
  • Bugfix: fixing message rejection


  • Bugfix: fixing exclusive message handling
  • making rsmonitor sync host seed in config.
  • Bugfix: get messaging and changestream monitor to exit gracefully.
  • JMS Support for messaging
  • Bugfix: Validation
  • changing DriverTailableIterationCallback to have better control over stopping the tail
  • Build improvements
  • reorganizing tests, speeding up messaging

A warm thanks goes out to all that helped build this Releases! Not olny with code and pull requests, but also by filing in an issue! Thanks a lot!

created Stephan Bรถsebeck (stephan)

Ooops: Error

FreeMarker template error (DEBUG mode; use RETHROW in production!): The following has evaluated to null or missing: ==> errormsg [in template "error.ftl" at line 6, column 37] ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (!myDefault, ( ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${errormsg} [in template "error.ftl" at line 6, column 35] ---- Java stack trace (for programmers): ---- freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...] at freemarker.core.InvalidReferenceException.getInstance( at freemarker.core.EvalUtil.coerceModelToTextualCommon( at freemarker.core.EvalUtil.coerceModelToStringOrMarkup( at freemarker.core.EvalUtil.coerceModelToStringOrMarkup( at freemarker.core.DollarVariable.calculateInterpolatedStringOrMarkup( at freemarker.core.DollarVariable.accept( at freemarker.core.Environment.visit( at freemarker.core.Environment.visit( at freemarker.core.Environment.process( at freemarker.template.Template.process( at org.springframework.web.servlet.view.freemarker.FreeMarkerView.processTemplate( at org.springframework.web.servlet.view.freemarker.FreeMarkerView.doRender( at org.springframework.web.servlet.view.freemarker.FreeMarkerView.renderMergedTemplateModel( at org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel( at org.springframework.web.servlet.view.AbstractView.render( at org.springframework.web.servlet.DispatcherServlet.render( at org.springframework.web.servlet.DispatcherServlet.processDispatchResult( at org.springframework.web.servlet.DispatcherServlet.doDispatch( at org.springframework.web.servlet.DispatcherServlet.doService( at org.springframework.web.servlet.FrameworkServlet.processRequest( at org.springframework.web.servlet.FrameworkServlet.doGet( at javax.servlet.http.HttpServlet.service( at org.springframework.web.servlet.FrameworkServlet.service( at javax.servlet.http.HttpServlet.service( at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( at org.apache.catalina.core.ApplicationFilterChain.doFilter( at org.apache.catalina.core.ApplicationDispatcher.invoke( at org.apache.catalina.core.ApplicationDispatcher.doInclude( at org.apache.catalina.core.ApplicationDispatcher.include( at org.apache.catalina.core.StandardHostValve.custom( at org.apache.catalina.core.StandardHostValve.status( at org.apache.catalina.core.StandardHostValve.throwable( at org.apache.catalina.core.StandardHostValve.invoke( at org.apache.catalina.valves.ErrorReportValve.invoke( at org.apache.catalina.core.StandardEngineValve.invoke( at org.apache.catalina.connector.CoyoteAdapter.service( at org.apache.coyote.http11.Http11Processor.service( at org.apache.coyote.AbstractProcessorLight.process( at org.apache.coyote.AbstractProtocol$ConnectionHandler.process( at$SocketProcessor.doRun( at at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker( at java.base/java.util.concurrent.ThreadPoolExecutor$ at org.apache.tomcat.util.threads.TaskThread$ at java.base/