1. Could not initialize Collection-JPA forum.hibernate.orgHi, In my DAO i have combined two tables and excecuted a query somethg like: select object(obj) from POL pol,REQ req where pol.adc=req.adc and pol.inicd='133' I have used EntityA having one to many relationship with EntityB like: @OneToMany(mapped by="collection") List |
2. could not initialize a collection: forum.hibernate.orgI am getting this exception when I am trying to call a Stateless Session EJB remote multiple times from a single thread. nested exception is: javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: could not initialize a collection: Basically I have an API which returns data based on start index, end index and sort column. After fetching around 8K to 9K records, This exception comes up. All ... |
3. could not initialize a collection: forum.hibernate.orgHi I am getting following exception while trying load collection of objects in many-to-many relation. Please help me to resolve this issue... Exception in thread "main" org.hibernate.exception.SQLGrammarException: could not initialize a collection: [com.hibernate.manytomany.Student.courses#100] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.loader.Loader.loadCollection(Loader.java:1992) at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36) 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.PersistentSet.toString(PersistentSet.java:309) at java.lang.String.valueOf(Unknown Source) at java.lang.StringBuilder.append(Unknown Source) at com.hibernate.manytomany.StudentTestCase.main(StudentTestCase.java:20) ... |
4. Simpler way of specifying what collections to initialize forum.hibernate.orgI thought of a simpler way to specify what parts of a class that should be loaded, or actually, which set/bag/.. (Collection type) properties that should be initialized. Eg, I thought of something like this. If you have class Owner { Set cats; Set friends; Set hobbies; } then Session.load(Owner.class, id, "cats", "friends") would load the Owner with it's set of ... |
5. Any way to initialize collections in bulk? forum.hibernate.orgI'm looking for a way or for suggestions on how to initialize lazy loaded collections in bulk. For example, let's say I have a class like the following: Code: class Person { Set childSet; Set friendSet; Set parentSet; ... } I have already loaded a list of Person objects via a query. ... |
6. could not initialize collection forum.hibernate.org |
7. Is my lazzy collection initialized forum.hibernate.org |
8. could not initialize collection forum.hibernate.orgI am getting exception "could not initialize collection" after a criteria query that looks like it is working correctly. I suspect it has something to do with the inclusion of an "extra" field in an association table in a composite-element, as I'm not sure what kinds of objects are being stored my "java.util.Set" (I'm hoping StatementItem objects). Hibernate version: 2.1.6 Mapping ... |
9. JDBCException: could not initialize collection forum.hibernate.org |
10. Could not initialize a collection forum.hibernate.orgNeed help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp [b]Hibernate version:3.0[/b] [b]Mapping documents:[/b] [b]Code between sessionFactory.openSession() and session.close():[/b] [b]Full stack trace of any exception that occurs: 2005-06-02 10:27:40 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception java.lang.Exception: could not initialize a collection: [com.gloptv.smsc.SmsReceived.smsReplieds#212] at com.gloptv.smsc.PhoneNumber.deleteKeyword(Unknown Source) at com.gloptv.smsc.PhoneNumber$$FastClassByCGLIB$$35f1dac.invoke( |
11. GenericJDBCException: could not initialize a collection: forum.hibernate.orgAuthor Message mikemil Post subject: GenericJDBCException: could not initialize a collection: Posted: Fri Oct 28, 2005 11:03 pm Newbie Joined: Fri Oct 28, 2005 10:54 pm Posts: 11 Getting GenericJDBCException: could not initialize a collection: This should be fairly straight forward so I must be doing something wrong! Hibernate version: 3.0.5 Mapping documents: associate.hbm.xml |
12. SQLGrammarException: could not initialize a collection forum.hibernate.orgHibernate version: 3.1 Mapping documents: |
13. SQLGrammarException: could not initialize a collection forum.hibernate.orgHibernate version: 3.1 beta2 Relevant mapping documents: Resposta.hbm.xml: |
14. Could not initialize a collection forum.hibernate.orgThis is kind of weird. Usually ( I'd say most of times ) I get this error. Code: org.hibernate.exception.GenericJDBCException: could not initialize a collection: [ar.com.nextel.model.solicitudes.beans.Item.serviciosAdicionalesSoportados#1302 17] at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLSta teConverter.java:103) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java :43) at org.hibernate.loader.Loader.loadCollection(Loader.java:1992) at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader .java:36) at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(Ab stractCollectionPersister.java:565) ... |
15. "could not initialize a collection" Issue forum.hibernate.org |
16. Initialize collections using AliasToBeanResultTransformer forum.hibernate.orgHi I'm running a HQL query and using an AliasToBeanResultTransformer to create bean instances. Child collections are not initialized by that transformer, I believe this is "as designed". If, however, I do need initialized collections, what should I do? Reloading (session.refresh()) each object seems stupid, as I've just accessed all required data using the query, so running a SELECT for each ... |
17. Initialize collections using AliasToBeanResultTransformer forum.hibernate.orgHi I'm running a HQL query and using an AliasToBeanResultTransformer to create bean instances. Child collections are not initialized by that transformer, I believe this is "as designed". If, however, I do need initialized collections, what should I do? Reloading (session.refresh()) each object seems stupid, as I've just accessed all required data using the query, so running a SELECT for each ... |
18. "could not initialize a collection" on one-to-many forum.hibernate.orgNewbie Joined: Fri Feb 22, 2008 11:52 am Posts: 6 Hello, My problem is as follows: I have a problem with 2 one-to-many associations using a join table. My mapping works fine unless I add any of the two last associations (I tried formulating it in other ways but then my list just ends up empty). (The error is on one ... |