All,
I'm kinda stuck on this issue.
What I have:
1) My spring-configuration for the sessionFactory
Code:
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
<property name="annotatedClasses">
<list>
<value>x.y.z.Event</value>
</list>
</property>
</bean>
2) My annotated class Event:
Code:
@Entity
@Table(name = "Event")
public class Event {
//All my private fields with getter and setter
}
So my problem now is that every time I try to do persist a new 'Event' in my database I end up with the error:
org.hibernate.MappingException: Unknown entity: x.y.z.Event
When debugging my application the sessionFactory is wired perfectly, however in the class 'org.hibernate.impl.SessionFactoryImpl' it crashes at line 626:
Code:
EntityPersister result = (EntityPersister) entityPersisters.get(entityName);
where no 'EntityPersister' could be found for my entity.
Can anyone tell me what's wrong (or what's missing) in my mapping-configuration?
Kr,
Dirk