-->
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.  [ 3 posts ] 
Author Message
 Post subject: <Sessionfactory error
PostPosted: Tue Sep 05, 2006 1:43 am 
Newbie

Joined: Tue Sep 05, 2006 1:29 am
Posts: 2
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: :3.2

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Problems with Session and transaction handling?yes

Read this: http://hibernate.org/42.html

Error is <Sessionfactory error: entity class not found: Addressarea >






/**
* Addressarea generated by hbm2java
*/
public class Addressarea implements java.io.Serializable {

// Fields

private long addSlno;
private String addcountry;
private String city;
private String area;
private String pincode;

// Constructors

/** default constructor */
public Addressarea() {
}

/** minimal constructor */
public Addressarea(long addSlno) {
this.addSlno = addSlno;
}
/** full constructor */
public Addressarea(long addSlno, String addcountry, String city, String area, String pincode) {
this.addSlno = addSlno;
this.addcountry = addcountry;
this.city = city;
this.area = area;
this.pincode = pincode;
}


// Property accessors
public long getAddSlno() {
return this.addSlno;
}

public void setAddSlno(long addSlno) {
this.addSlno = addSlno;
}
public String getAddcountry() {
return this.addcountry;
}

public void setAddcountry(String addcountry) {
this.addcountry = addcountry;
}
public String getCity() {
return this.city;
}

public void setCity(String city) {
this.city = city;
}
public String getArea() {
return this.area;
}

public void setArea(String area) {
this.area = area;
}
public String getPincode() {
return this.pincode;
}

public void setPincode(String pincode) {
this.pincode = pincode;
}




}


<?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 Sep 4, 2006 4:47:51 PM by Hibernate Tools 3.2.0.beta6a -->
<hibernate-mapping>
<class name="com.srit.his.persistence.Addressarea" table="ADDRESSAREA">
<id name="addSlno" type="long">
<column name="ADD_SLNO" precision="18" scale="0" />
<generator class="assigned" />
</id>
<property name="addcountry" type="string">
<column name="ADDCOUNTRY" length="50" />
</property>
<property name="city" type="string">
<column name="CITY" length="50" />
</property>
<property name="area" type="string">
<column name="AREA" length="50" />
</property>
<property name="pincode" type="string">
<column name="PINCODE" length="50" />
</property>
</class>
</hibernate-mapping>


<?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-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">
oracle.jdbc.driver.OracleDriver
</property>
<property name="hibernate.connection.password">
PATIENTMOD
</property>
<property name="hibernate.connection.url">
jdbc:oracle:thin:@192.168.1.74:1521:SHELLNET
</property>
<property name="hibernate.connection.username">
PATIENTMOD
</property>
<property name="default_schema">PATIENTMOD</property>
<property name="hibernate.dialect">
org.hibernate.dialect.Oracle9Dialect
</property>
<!-- mapping
resource="com/srit/his/persistence/Addressarea.hbm.xml" / -->
</session-factory>
</hibernate-configuration>


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 05, 2006 2:47 am 
Beginner
Beginner

Joined: Mon Nov 22, 2004 11:21 am
Posts: 42
Maybe a stupid question, but is your Class "Addressarea" really located in the "com.srit.his.persistence" package? Is this package inside your classpath?

_________________
Real programmers confuse Halloween and Christmas because OCT 31 = DEC 25


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 05, 2006 2:57 am 
Newbie

Joined: Tue Sep 05, 2006 1:29 am
Posts: 2
Thanx dear. And Im not from Java background. B4 I rreceive your reply...I got the solution. Anyway thanx for the solution.


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

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.