fixed bug TDQ-9438 Handle the closure of mapDB when running the analysis
and drilling down.

fixed junit and some logic error