java - Getting hibernate entity error -


I'm using hibernate in the Spring app but due to some problem I can not use spring injection, so manually Session is to announce a declaration like factory below

As I am using annotations in the unit class, I get the following error

  org.hibernate.MappingException: unknown entity: com.vaannila .domain.Registration & lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt ;! DOCTYPE Hibernate-Configuration PUBLIC "- // Hibernate / Hibernate Configuration DTD 3.0 / N" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> & Lt; Hibernate-configuration & gt; & Lt; Session-Factory & gt; & Lt ;! - We are using MySQL database so that the quote with MySQL - & gt; & Lt; Property Name = "hibernate.dialect" & gt; Org.hibernate.dialect.MySQL5InnoDBDialect & lt; / Property & gt; & Lt ;! - Enable it to see the SQL statement in the log - & gt; & Lt; Property Name = "show_sql" & gt; True & lt; / Property & gt; & Lt ;! - This will leave our existing database and make a new one. Existing data will be deleted! - & gt; & Lt; Property Name = "hbm2ddl.auto" & gt; Update & lt; / Property & gt; & Lt; Mapping class = "com.vaannila.domain.ountry" /> & Lt; / Session-Factory & gt; & Lt; / Hibernate-configuration & gt;    

This class may be due to an incorrect FQCN entry for registration or, maybe That be

  import javax.preistence.Entity; Instead of   

,

  import org.hibernate.annotations.Entity;    

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -