-->
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.  [ 1 post ] 
Author Message
 Post subject: org.hibernate.MappingException: Unknown entity: x.y.z.Event
PostPosted: Sat Dec 25, 2010 10:21 pm 
Newbie

Joined: Sat Dec 25, 2010 10:11 pm
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.