Hi...here is my mapping file. my database is db2
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="infozeal.Categories" table="Administrator.CTGR_LIST">
<property name="CTGR_TYPE_CD" column="CTGR_TYPE_CD" type="String"/>
<property name="CTGR_TYPE_DSCR_TX" column="CTGR_TYPE_DSCR_TX" type="String"/>
<property name="CTGR_LVL_1_TX" column="CTGR_LVL_1_TX" type="String"/>
<property name="CTGR_LVL_2_TX" column="CTGR_LVL_2_TX" type="String"/>
<property name="CTGR_LVL_3_TX" column="CTGR_LVL_3_TX" type="String"/>
<property name="CTGR_LVL_4_TX" column="CTGR_LVL_4_TX" type="String"/>
</class>
</hibernate-mapping>
my java file
public class CategoryList implements Serializable
{
private String CTGR_TYPE_CD=null;
private String CTGR_TYPE_DSCR_TX=null;
private String CTGR_LVL_1_TX=null;
private String CTGR_LVL_2_TX=null;
private String CTGR_LVL_3_TX=null;
private String CTGR_LVL_4_TX=null;
//CTGR_TYPE_CODE GET METHOD
public String getCTGR_TYPE_CD()
{
return CTGR_TYPE_CD;
}
// CTGR_TYPE_CODE SET METHOD
private void setCTGR_TYPE_CD(String CTGR_TYPE_CD)
{
this.CTGR_TYPE_CD=CTGR_TYPE_CD;
}
// CTGR_TYPE_DSCR_TX GET METHOD
public String getCTGR_TYPE_DSCR_TX()
{
return CTGR_TYPE_DSCR_TX;
}
// CTGR_TYPE_DSCR_TX SET METHOD
private void setCTGR_TYPE_DSCR_TX(String CTGR_TYPE_DSCR_TX)
{
this.CTGR_TYPE_DSCR_TX=CTGR_TYPE_DSCR_TX;
}
// CTGR_TYPE_LVL_1_TX GET METHOD
public String getCTGR_LVL_1_TX()
{
return CTGR_LVL_1_TX;
}
// CTGR_TYPE_LVL_1_TX SET METHOD
private void setCTGR_LVL_1_TX(String CTGR_LVL_1_TX)
{
this.CTGR_LVL_1_TX=CTGR_LVL_1_TX;
}
// CTGR_TYPE_LVL_2_TX GET METHOD
public String getCTGR_LVL_2_TX()
{
return CTGR_LVL_2_TX;
}
// CTGR_TYPE_LVL_2_TX SET METHOD
private void setCTGR_LVL_2_TX(String CTGR_LVL_2_TX)
{
this.CTGR_LVL_2_TX=CTGR_LVL_2_TX;
}
// CTGR_TYPE_LVL_3_TX GET METHOD
public String getCTGR_LVL_3_TX()
{
return CTGR_LVL_3_TX;
}
// CTGR_TYPE_LVL_3_TX SET METHOD
private void setCTGR_LVL_3_TX(String CTGR_LVL_3_TX)
{
this.CTGR_LVL_3_TX=CTGR_LVL_3_TX;
}
// CTGR_TYPE_LVL_4_TX GET METHOD
public String getCTGR_LVL_4_TX()
{
return CTGR_LVL_4_TX;
}
// CTGR_TYPE_LVL_4_TX SET METHOD
private void setCTGR_LVL_4_TX(String CTGR_LVL_4_TX)
{
this.CTGR_LVL_4_TX=CTGR_LVL_4_TX;
}
}
i getting following error
21:17:28,175 ERROR XMLHelper:48 - Error parsing XML: XML InputStream(16) The content of element type "class" must match "(meta*,(cache|jcs-cache)?,(id|composite-id),discriminator?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|any|map|set|list|bag|idbag|array|primitive-array)*,(subclass*|joined-subclass*))".
net.sf.hibernate.MappingException: Error reading resource: infozeal/Categories.hbm.xml
at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:340)
at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:1027)
at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:983)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:911)
|