Workaround (example): Use "query.addScalar("emp_first_name", new StringType());" instead of "query.addScalar("emp_first_name");".
SQLQueryImpl#addScalar(String) assumes a null for type, causing the NPE later on.