List <Account> accounts = MapperRegistry.getInstance().getAccountManagement().getAccounts(loggedInUser);
if (accounts != null && !accounts.isEmpty()) {
for (Account acc: accounts) {
if (acc.getConnection().getId().equals(xCon.getId())) {
if (acc instanceof PaloAccountImpl) {
ServerConnectionPool pool = ConnectionPoolManager.getInstance().getPool(acc, sessionId);
Connection con = pool.getConnection("getCubes");
((PaloAccountImpl) acc).setConnection(con);
for (Database db: con.getDatabases()) {
if (db.getId().equals(xDb.getId())) {
List <XCube> cubes = new ArrayList<XCube>();
for (Cube c: db.getCubes()) {