1. hibernate IdentifierGenerationException after upgrade forum.hibernate.orgHi to all. since when I upgraded the hibernate3.jar in my java/struts/mysql/tomcat application, I have this error in the stack: javax.servlet.ServletException: Servlet execution threw an exception ... root cause org.hibernate.id.IdentifierGenerationException: no natural-id property defined; need to specify [key] in generator parameters org.hibernate.id.SelectGenerator.determineNameOfPropertyToUse(SelectGenerator.java:73) org.hibernate.id.SelectGenerator.access$100(SelectGenerator.java:52) org.hibernate.id.SelectGenerator$SelectGeneratorDelegate. |
2. How to Resolve an IdentifierGenerationException? forum.hibernate.orgat org.hibernate.id.Assigned.generate(Assigned.java:56) at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:122) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:117) 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:144) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:117) 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.impl.SessionImpl.saveOrUpdate(SessionImpl.java:523) |
3. IdentifierGenerationException forum.hibernate.orgHibernate version: 3.1 Mapping documents: |
4. IdentifierGenerationException! forum.hibernate.org |
5. IdentifierGenerationException! forum.hibernate.orgGuys, Need help with the following exception: 19328 [main] ERROR org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session org.hibernate.HibernateException: Unexpected row count: 0 expected: 1 at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:32) at org.hibernate.persister.entity.BasicEntityPersister.update(BasicEntityPersister.java:1982) at org.hibernate.persister.entity.BasicEntityPersister.updateOrInsert(BasicEntityPersister.java:1909) at org.hibernate.persister.entity.BasicEntityPersister.update(BasicEntityPersister.java:2149) at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:75) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:137) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:324) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:86) at com.ihg.croservice.eis.db.HotelFactory.setBrand(HotelFactory.java:593) at com.ihg.croservice.bo.EventManager.testSetBrand(EventManager.java:486) at com.ihg.croservice.bo.EventManager.main(EventManager.java:129) org.hibernate.HibernateException: Unexpected row ... |