Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

class not found exception while running my first hebernate example

 
kiran kumar reddy
Ranch Hand
Posts: 94
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am a newbie to hibernate i was trying to run my first hibernate program but it says "class not found exception"
i was running in eclipse IDE and i have attached all jars and i ran Manager.java....i am attaching a screen shot of my eclipse error and details of my program......
here is Person.hbm.xml file contents...i use Oracle XE with port n0:5656......

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-mapping package="kiran.kumar">
<class name="Person" table="PERSON">
<id name="id" column="PERSON_ID">
<generator class="native"/>
</id>
<property name="age"/>
<property name="firstName" column="first_name"/>
<property name="lastName" column="last_name"/>

</class>
</hibernate-mapping>
_________________________________________________________________________

here is my Person.java file
package kiran.kumar;

public class Person {
private Integer id;
private String firstName;
private String lastName;
private Integer age;
public Integer getId()
{
return id;
}
public void setId(Integer id)
{
this.id=id;
}
public String getfirstName()
{
return firstName;
}
public void setfirstName(String firstName)
{
this.firstName=firstName;
}
public String getlastName()
{
return lastName;
}
public void setlastName(String lastName)
{
this.lastName=lastName;
}
public Integer getAge()
{
return age;
}
public void setAge(Integer age)
{
this.age=age;
}
}
_____________________________________________________________________________________________________

......
please help me to correct my error
hibernate_cgf_xml.JPG
[Thumbnail for hibernate_cgf_xml.JPG]
eclipse_structure.JPG
[Thumbnail for eclipse_structure.JPG]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic