-->
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.  [ 3 posts ] 
Author Message
 Post subject: 3.3.2.GA - Unable to resolve entity name from Class
PostPosted: Thu Jul 09, 2009 4:43 am 
Newbie

Joined: Mon Nov 19, 2007 8:40 am
Posts: 5
After upgrading (from 3.3.0.SP1) to 3.3.2.GA we have started getting the follow stack trace logged:

Code:
org.hibernate.HibernateException: Unable to resolve entity name from Class [com.cyclone.netPrefect.admin.restriction.complex.TimeSpanRestrictionItemEntity] expected instance/subclass of [RestrictionItem]
   at org.hibernate.tuple.entity.PojoEntityTuplizer.determineConcreteSubclassEntityName(PojoEntityTuplizer.java:363)
   at org.hibernate.persister.entity.AbstractEntityPersister.getSubclassEntityPersister(AbstractEntityPersister.java:3643)
   at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1375)
   at org.hibernate.engine.ForeignKeys.isTransient(ForeignKeys.java:203)
   at org.hibernate.event.def.AbstractSaveEventListener.getEntityState(AbstractSaveEventListener.java:535)
   at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:103)
   at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
   at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:535)
   at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:527)
   at org.hibernate.engine.CascadingAction$5.cascade(CascadingAction.java:241)
   at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:292)
   at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:240)
   at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:193)
   at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:320)
   at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:266)
   at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:243)
   at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:193)
   at org.hibernate.engine.Cascade.cascade(Cascade.java:154)
   at org.hibernate.event.def.AbstractSaveEventListener.cascadeAfterSave(AbstractSaveEventListener.java:479)
   at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:357)
   at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204)
   at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:130)
   at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)
   at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56)
   at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)
   at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50)
   at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
   at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:563)
   at org.hibernate.impl.SessionImpl.save(SessionImpl.java:551)
   at org.springframework.orm.hibernate3.HibernateTemplate$13.doInHibernate(HibernateTemplate.java:706)
   at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419)
   ... 22 more


The com.cyclone.netPrefect.admin.restriction.complex.TimeSpanRestrictionItemEntity is mapped (with entity name TimeSpanRestrictionItem) as a joined subclass of the entity named RestrictionItem.

I have had a look at the Hibernate source for 3.3.2.ga and it looks like problem is the way that the org.hibernate.tuple.entity.EntityMetamodel is using it entityNameByInheritenceClassNameMap field:
    * Puts to the map are based on PersistentClass.getMappedClass() as a key - a Class object
    * Gets from the map (in findEntityNameByEntityClass method) are using the class name

Presumably (given the name of the map field) both put and get should be using the class name.

Shall I raise a JIRA issue? (Or have I missed something?)


Top
 Profile  
 
 Post subject: Re: 3.3.2.GA - Unable to resolve entity name from Class
PostPosted: Mon Jan 18, 2010 10:31 am 
Newbie

Joined: Wed Feb 27, 2008 1:33 pm
Posts: 3
http://opensource.atlassian.com/project ... e/HHH-4036


Top
 Profile  
 
 Post subject: Re: 3.3.2.GA - Unable to resolve entity name from Class
PostPosted: Thu Mar 11, 2010 10:33 am 
Newbie

Joined: Thu Mar 11, 2010 10:25 am
Posts: 1
I am also getting this error with table per class entities.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.