All posts tagged with 'Hibernate'

JPA Criteria Query or plain SQL

25-Sep-12

Note: The following stuff is not Hibernate specific but is true for every JPA2 provider and falls into the category of JPA criteria query. Some days ago i just saw this video Christin Gorman about Hibernate. Although i don’t agree with her and i actually do like hibernate as a great tool, there are certainly […]

Read the complete article »

Fixing hibernate “Cannot release connection” exception using DBCP and MySQL.

21-Nov-11

Every 8 hours i got a Hibernate exception “Cannot release connection” within a Java application using Hibernate, Apache DBCP on Tomcat: org.hibernate.exception.GenericJDBCException: Cannot release connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29) .. .. Caused by: java.sql.SQLException: Already closed. Not only that the messages polluted my inbox, the exception was visible to the enduser, […]

Read the complete article »

Some random Grails thoughts and tipps

04-Dec-08

Lately i’ve been rambling and ranting a lot on twitter about the Grails framework. To my surprise, many other developers actually read this tweets and helped me out on some problems. Thanks a lot gals and guys, i really appreciate that. Me rambling isn’t meant to be personal at any time, i guess you know […]

Read the complete article »

Hibernate and Inheritance Mapping

27-May-08

Hibernate supports multiple types of inheritance mapping, some of them (Table per class, Table per subclass) using a discriminator column to decide the class. The type of the discriminator can be one of string, character, integer, byte, short, boolean, yes_no, true_false In case you need to use any other than string or character, i.e. integer, […]

Read the complete article »

Using Hibernate with Oracle Spatial

05-Feb-07

Oracle Spatial Datatype JGeometry from the spatial api (which can be found here) can easily be used with hibernate through a custom dialect and a custom type that delegates to an instance from oracle sdo api. Everything that is needed is here: Mapping Spatial Oracle type SDO_GEOMETRY to JGeometry The only quirk with this solution […]

Read the complete article »