Home Tutorialhelp Comment org.hibernate.cfg.Environment)

 
 

Comment

Anita
org.hibernate.cfg.Environment),
May 12, 2008 at 10:57 PM

hi.... I use the above code to run my project but it showed me following error: log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment). log4j:WARN Please initialize the log4j system properly. entity class not found: Student But the Student class is present. Even i did mapping in hibernate.cfg.xml The Person.hbm.xml file is: <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <!-- Generated May 12, 2008 11:13:52 AM by Hibernate Tools 3.2.1.GA --> <hibernate-mapping> <class name="Person" table="person" catalog="test"> <id name="personId" type="int"> <column name="personId" /> <generator class="assigned" /> </id> </class> </hibernate-mapping> and the Student.hbm.xml file is: <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <!-- Generated May 12, 2008 11:13:52 AM by Hibernate Tools 3.2.1.GA --> <hibernate-mapping> <class name="Student" table="student" catalog="test"> <id name="studentId" type="int"> <column name="studentId" /> <generator class="assigned" /> </id> <property name="studentName" type="string"> <column name="studentName" length="20" /> </property> <property name="studentAge" type="java.lang.Integer"> <column name="studentAge" /> </property> <property name="personId" type="java.lang.Integer"> <column name="personId" /> </property> </class> </hibernate-mapping>
View All Comments | View Tutorial
Advertisement
Related Tutorial and Articles
Advertisements Advertisements
 

 

 

DMCA.com