Q:

Criteria generates SQL Query correctly but it does not return anything

A criteria is used to retrieve data from database.  It generates SQL Query perfectly, which is tested on mySql separately and the records are loaded correctly;However, when using Criterial.list() it gives me an empty list. 
I have checked my DB connections, and they are all correct.  What would have caused this problem? 

UPDATED
Here is my code:
accCr = DetachedCriteria.forClass(TSESpotInvestorAccount.class, "acc");
accCr.setResultTransformer(DetachedCriteria. DISTINCT_ROOT_ENTITY);
accCr.add(Restrictions.eq("exchangeDepositNo", filter.getBc()));
accCr.setProjection(Projections.id());
List accIds = getHibernateTemplate().findByCriteria(accCr);

A:

Your code doesn't make much sense:
accCr.setResultTransformer(DetachedCriteria. DISTINCT_ROOT_ENTITY);

The above line says that the query is supposed to return entities (with, potentially, joined entities), and that Hibernate should return only distinct entities
accCr.setProjection(Projections.id());

The above line says that the query must only return one scalar column: the ID of the root entity. 
If what you want is a list of IDs, then don't set the distinct root entity result transformer.