MongoDB, Spark and FreeMarker Template Engine together