-->
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: Could not initialize a collection
PostPosted: Thu Mar 29, 2007 3:13 pm 
Newbie

Joined: Fri Apr 15, 2005 9:22 am
Posts: 11
This 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)
   at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializ
eCollection(DefaultInitializeCollectionEventListener.java:60)
   at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716)
   at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPer
sistentCollection.java:344)
   at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersisten
tCollection.java:86)
   at org.hibernate.collection.PersistentSet.iterator(PersistentSet.java:163)
   at java.util.Collections$1.<init>(Collections.java:993)
   at java.util.Collections$UnmodifiableCollection.iterator(Collections.java:992)
   at ar.com.nextel.model.solicitudes.synchronization.changeLog.builder.ItemChange
LogEntriesBuilder.buildOneToManyChangeLogEntries(ItemChangeLogEntriesBuilder.jav
a:35)


It has never happened before. My mappings are OK.

Usually if I retrieve from DB some datas it works well but if I load the same datas with lot of more datas, the exception is thrown at some common point.

Any one got experience on this ?

Regards.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 29, 2007 11:37 pm 
Expert
Expert

Joined: Tue Jan 30, 2007 12:45 am
Posts: 283
Location: India
Hi jfreebsd,

It comes when corrupt data in data base .Let say one column is mapped with int but value in the data base in string . it only happens when you do not have constrain for DB column

_________________
Dharmendra Pandey


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.