This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes SQLGrammarException using Hibernate + Embedded Derby Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "SQLGrammarException using Hibernate + Embedded Derby" Watch "SQLGrammarException using Hibernate + Embedded Derby" New topic
Author

SQLGrammarException using Hibernate + Embedded Derby

James Adams
Ranch Hand

Joined: Sep 12, 2003
Posts: 188
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

Joined: Sep 12, 2003
Posts: 188
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
 
jQuery in Action, 2nd edition
 
subject: SQLGrammarException using Hibernate + Embedded Derby
 
Similar Threads
Error: Active Spring transaction synchronization required
Issue in inserting into DB using Hibernate, Spring
Communication failure during handshake. Is there a server running on localhost:3306?
Spring hibernate integration problem
Maximum Pool Connection using Hibernate..