Hi 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.<init>(SelectGenerator.java:117) org.hibernate.id.SelectGenerator$SelectGeneratorDelegate.<init>(SelectGenerator.java:98) org.hibernate.id.SelectGenerator.getInsertGeneratedIdentifierDelegate(SelectGenerator.java:64) org.hibernate.persister.entity.AbstractEntityPersister.postConstruct(AbstractEntityPersister.java:3145) org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:439) org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84) org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:272) org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1385)
So I tried to replace the slf4j library with other versions, added slf4j-api, slf4j-jdk ,etc but unsuccessfully. I tried another versione of hibernate3.jar, but the problem stay the same.
Could you please help me? I don't know what to do. thanks in advance.
|