ERROR Incorrect syntax near hibernate

ERROR Incorrect syntax near hibernate

Working with Hibernate and while calling the stored procedure you get exception “ERROR: Incorrect syntax near ‘.'” details of exception below:

  • Solution: Best way to debug this issue to enable to see what SQL is getting fired as below:

Once show SQl property is enabled you could see what query is getting fired and if anything wrong with that query. For example in my case I was using the stored procedure as named query to get the data but “{}” was missing as below:

  • Missing {}:

ERROR Incorrect syntax near hibernate

  • Corrected:

ERROR Incorrect syntax near hibernate

Reference:

Leave a Reply

Your email address will not be published. Required fields are marked *