Stephan van Hulst wrote:No, libraries don't need a main method.
Can you show us your POM, the command you use to compile the project, and its output?
Jaikiran Pai wrote:
So it really isn't a problem in JPA or Hibernate. Whatever value has been fetched is being displayed in that JSP and it appears that the JSP is written such that it is expecting the string literal "student_name" to be a number, which obviously is wrong. So the fix needs to be done in the JSP.
Jaikiran Pai wrote:Can you post the entire exception stacktrace? That exception is an indication that the query is working fine but somewhere something is incorrectly using student_name as a number.
Jaikiran Pai wrote:I don't think you need a dummy entity for any of this. What happened when you tried the code that I posted in my previous reply? I could have tried it myself but I don't have the necessary setup to quickly try this.
Have you tried: