PersistentSet.size() doesn't return at all while working on postgres database. It's not the case always, but, sometimes it happens. After enabling the logs came to know that a select statement like the following
select * from table1 where table1.column1 in (select column2 from table2 where table2.column=?)
The above select statement is not returning at all.
The following is the stack trace found upon interrupting the application: chs.pof.util.PofException: org.xml.sax.SAXException: org.hibernate.exception.JDBCConnectionException: could not load collection by subselect: [...] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.loader.Loader.loadCollectionSubselect(Loader.java:1996) at org.hibernate.loader.collection.SubselectOneToManyLoader.initialize(SubselectOneToManyLoader.java:58) at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:565) at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60) at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716) at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344) at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86) at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:109) at org.hibernate.collection.PersistentSet.size(PersistentSet.java:139)
Thanks in advance, Kiran
|