-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: PreparedStatement is closed.
PostPosted: Wed Jun 07, 2006 12:59 am 
Regular
Regular

Joined: Sat Jan 07, 2006 8:30 pm
Posts: 68
Anyone has an idea what can be the cause of this exception ? THe sessionn is still open. THe generated SQL is valid and runs. I use Postgresql 8.0 and the latest driver. The error started to occur when start adding a type to a column for safe type enumeration.

<property name="prefix" column="prefix_id" not-null="true">
<type name="framework.core.utils.hibernate.GenericEnumUserType">
<param name="lookupClass">core.domain.enums.PrefixType</param>
<param name="identifierMethod">getId</param>
<param name="lookupMethod">lookup</param>
</type>
</property>


The errors seems to be triggered when the above column is initialized via lookupMethod. THat calls a service that connects to the db and gets the needed info.



Hibernate version:3.1.3 and 3.2


2006-06-06 23:45:46,593 [http-8080-Processor25]: WARN org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:276) - exception clearing maxRows/queryTimeout
java.sql.SQLException: org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement is closed.
at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.checkOpen(DelegatingStatement.java:136)
at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.getMaxRows(DelegatingStatement.java:234)
at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:272)
at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:209)
at org.hibernate.loader.Loader.doQuery(Loader.java:714)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1785)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2821)
at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:370)
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:351)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:122)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:81)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:871)
at org.hibernate.impl.SessionImpl.immediateLoad(SessionImpl.java:829)
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:66)
at org.hibernate.Hibernate.initialize(Hibernate.java:291)


....


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 08, 2006 11:16 am 
Regular
Regular

Joined: Sat Jan 07, 2006 8:30 pm
Posts: 68
If I do the lookupMethod on a different session I won't have this issue!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.