I'm using Hibernate....
my xml file
===== MaterialDTO.hbm.xml =======
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-mapping>
<class name="factory.material.MaterialDTO" table="material" >
<id name="matid" column="MATID" type="java.lang.Long" unsaved-value="0">
<generator class="identity"/>
</id>
<property name="matname" column="MATNUM" type="java.lang.String" />
<property name="mattype" column="MATTYPE" type="java.lang.String" />
<property name="matname" column="MATNAME" type="java.lang.String" />
<property name="matprovider" column="MATPROVIDER" type="java.lang.String" />
<property name="matunit" column="MATUNIT" type="java.lang.String" />
<property name="matcost" column="MATCOST" type="java.lang.String" />
<property name="isdelete" column="ISDELETE" type="java.lang.String" />
</class>
</hibernate-mapping>
====== hibernate.cfg.xml =====
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.datasource">
java:comp/env/jdbc/DBConn</property>
<property name="show_sql">true</property>
<property name="use_outer_join">true</property>
<property name="dialect">net.sf.hibernate.dialect.MySQLDialect</property>
<!-- Mapping files -->
<mapping resource="factory/material/MaterialDTO.hbm.xml"/>
</session-factory>
</hibernate-configuration>
but when i want to add an object into database...
i saw the exception
javax.servlet.ServletException: net.sf.hibernate.MappingException: Error reading resource: factory/material/MaterialDTO.hbm.xml
any ideas?
thanks...