• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SQLGrammarException using Hibernate + Embedded Derby

 
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a Spring application which uses an embedded Derby database for unit testing.

Below is my DataSource configuration and Hibernate properties:



I get the following error when I start a DAO test:



Can anyone suggest what might be causing the above? Thanks in advance for any suggestions.

--James
 
James Adams
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I ended up getting around this error by putting the following into my Hibernate properties:

<prop key="hibernate.use_sql_comments">false</prop>

It seems that the Derby Hibernate dialect can't handle comments in the SQL.

--James
reply
    Bookmark Topic Watch Topic
  • New Topic