-
May 2nd, 2012, 04:20 AM
#1
connnection proxy not usable after transaction completion
Hi all!
We are largely using JdbcTemplate in our application (which is Spring 2.5 based). Unfortunately when testing the application we are getting lots of :
org.hibernate.HibernateException: connnection proxy not usable after transaction
completion
at org.hibernate.jdbc.BorrowedConnectionProxy.invoke( BorrowedConnectionProxy.java:66)
at $Proxy92.prepareStatement(Unknown Source)
at org.springframework.jdbc.core.JdbcTemplate$SimpleP reparedStatementCreator.createPreparedStatement(Jd bcTemplate.java:1436)
at org.springframework.jdbc.core.JdbcTemplate.execute (JdbcTemplate.java:581)
at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:637)
at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:666)
at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:674)
at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:71
This exception is raised when using BeanPropertyRowMapper: ex.
list.addAll(getJdbcTemplate().query(loadData,new Object[]{id},new BeanPropertyRowMapper(SitoCandidato.class)));
We have tested also with Spring 3.1.0 however the error remains. The only way to get it working is using plain PreparedStatement and ResultSet. However we cannot manage to rewrite all our queries.....
Any help ?
Thanks a lot !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules