This my method and every time I run it always say "could not read column value from result set: cColor; String index out of range: 0" and throws Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 0. Any Idea ? Can anybody tell me where's the error ?
--OpenSession here--
Query query = session.createSQLQuery("SELECT * FROM db.tblUnits "
+ "WHERE csTat = :paramStation AND cbrach = :paramLocId"
+ "AND (cType = 'repo units' OR cType = 'svc units')")
.setParameter("paramLocId", locId)
.setParameter("paramStation", station);
List<Object[]> oAvailableUnits = (List<Object[]>) query.list();
--CloseSession here--
Stringconcatenation on the next line.