I am using Struts2 & Hibernate and getting below error when I searched data with string test but works for me when I searched with numeric 111.
test
111
Your hql to sql converted query is generating:
"where employeeName=Name"
while it should be generating:
"where employeeName='Name'".
So your hql should be :
"where b.employeeName= ' " +empName+ " ' ";
Note : You don't need to do that for integer values, only applies to String variables.