JPA

Working with Hibernate and DB2 9, if you have a byte[] member in your entity which is supposed to be mapped to a BLOB column, you'll probably get:

ERROR [org.hibernate.util.JDBCExceptionReporter] - <DB2 SQL Error: SQLCODE=-301, SQLSTATE=07006, SQLERRMC=2, DRIVER=3.61.75>
ERROR [org.hibernate.event.def.AbstractFlushingEventListener] - <Could not synchronize database state with session>
org.hibernate.exception.SQLGrammarException: could not insert...

Which in general means wrong data type!

After throwing lots of hooks into the sea of Google & IBM, I came up with this one - thanks to Steve for his excellent fish

www.badlildog.com/words/

avim 08/02/2011 - 11:47

Spring JPA aims to significantly improve the implementation of data access layers by reducing the effort to the amount that's actually needed. As a developer you write your repository interfaces, including custom finder methods, and Spring will provide the implementation automatically.

 

Just to feel what Spring JPA is go to the getting-started tutorial at Spring Source Team Blog

 

Spring Data JPA - 1.0.1.RELASE is the last official release.

dmitri 11/09/2011 - 09:17

And a bunch of other excellent posts.  Worth reading  for anyone dealing with Hibernate or JPA.

 

http://blog.xebia.com/2009/04/09/jpa-implementation-patterns-removing-en...

 

shlomo 22/06/2009 - 09:06
Syndicate content