hi all
just downloaded hibernate 3.2.4.sp1 core, and annotations 3.3.0 ga
i'm not sure which versions they're upgrading from, both definitely version 3+ (from april 2006)
i'm now getting this error (multiple bags) on one of the applications i'm working on, and i really don't understand the problem
i've looked at another post with the same error, but i don't think the code is similar
http://forum.hibernate.org/viewtopic.php?p=2310316&
Code:
@SuppressWarnings("unchecked")
public static Collection<Category> getPrimaryCategories() {
Session s = HibernateUtil.getInstance().getSession(Category.class);
Criteria crit = s.createCriteria(Category.class);
crit.add(Restrictions.isNull("parent"));
Collection<Category> results = crit.list();
return results;
}
Code:
Stack Trace:
* org.hibernate.loader.BasicLoader.postInstantiate(BasicLoader.java:66)
* org.hibernate.loader.entity.EntityLoader.<init>(EntityLoader.java:75)
* org.hibernate.loader.entity.EntityLoader.<init>(EntityLoader.java:43)
* org.hibernate.loader.entity.EntityLoader.<init>(EntityLoader.java:33)
* org.hibernate.loader.entity.BatchingEntityLoader.createBatchingEntityLoader(BatchingEntityLoader.java:103)
* org.hibernate.persister.entity.AbstractEntityPersister.createEntityLoader(AbstractEntityPersister.java:1748)
* org.hibernate.persister.entity.AbstractEntityPersister.createEntityLoader(AbstractEntityPersister.java:1752)
* org.hibernate.persister.entity.AbstractEntityPersister.createLoaders(AbstractEntityPersister.java:2984)
* org.hibernate.persister.entity.AbstractEntityPersister.postInstantiate(AbstractEntityPersister.java:2977)
* org.hibernate.persister.entity.SingleTableEntityPersister.postInstantiate(SingleTableEntityPersister.java:690)
* org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:290)
* org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
* org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
* package.persistence.HibernateUtil.createSessionFactory(HibernateUtil.java:314)
* package.persistence.HibernateUtil.getSession(HibernateUtil.java:173)
* package.persistence.HibernateUtil.getSession(HibernateUtil.java:137)
* package.model.Category.getPrimaryCategories(Category.java:169)
using mssql server 2000
this is basically happening anywhere i am using the Session object
this code is inherited, so i only maintain it really
i don't use it at all in another app i am developing, and i haven't seen any errors there
can anyone point me in the direction of a solution?
cos right now, it might be easier to simply roll back to the version i was using before (preferably not though, especially if this is an issue in our code).
any advice
thanks
dave