aspose file tools*
The moose likes Object Relational Mapping and the fly likes class not found exception while running my first hebernate example Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "class not found exception while running my first hebernate example" Watch "class not found exception while running my first hebernate example" New topic
Author

class not found exception while running my first hebernate example

kiran kumar reddy
Ranch Hand

Joined: Jun 28, 2012
Posts: 94

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


[Thumbnail for hibernate_cgf_xml.JPG]

[Thumbnail for eclipse_structure.JPG]

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: class not found exception while running my first hebernate example
 
Similar Threads
cannot insert record in MS SQLServer 2000
org.hibernate.exception.GenericJDBCException
Mapping in Hibernate for nested Bean Structure
Hibernate mapping
/hibernate.cfg.xml not found while Running simple java program