안녕 내가 JSP로 사용하여 사용자 등록 양식에 대한 간단한 웹 응용 프로그램을 만들고 내가 ExeptionMappingNotFoundException : 자원 :
여기MappingNotFoundException: resource: user.hbm.xml not found
을 다음 얻고있다 내 응용 프로그램을 실행할 때 최대 절전 모드로 묶는하고 발견되지 user.hbm.xml
<?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">
<!-- Generated by MyEclipse Hibernate Tools. -->
**hibernate.cfg.xml**
<hibernate-configuration>
<session-factory>
<property name="hbm2ddl.auto">update</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="connection.url">jdbc:mysql://localhost:3306/employee</property>
<property name="connection.username">root</property>
<property name="connection.password"></property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="show_sql">true</property>
<mapping resource="hiber/user.hbm.xml"/>
</session-factory>
</hibernate-configuration>
user.hbm.xml 내 코드입니다
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="User" table="u400">
<id name="id">
<generator class="increment"></generator>
</id>
<property name="name"></property>
<property name="password"></property>
<property name="email"></property>
</class>
</hibernate-mapping>
프로젝트 구조
type Exception report
messageInternal Server Error
descriptionThe server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: org.hibernate.HibernateException: Could not parse configuration: /hiber/hibernate.cfg.xml
root cause
org.hibernate.HibernateException: Could not parse configuration: /hiber/hibernate.cfg.xml
root cause
org.dom4j.DocumentException: hibernate.sourceforge.net Nested exception: hibernate.sourceforge.net
파일에서 hibernet 3.0 jar 및 dtd 버전을 사용 중입니다. 3. – user3598351
okie..then 인코딩을 제거하려고 시도합니다. = hibernate.cfg.cml에서 인코딩 'UTF-8' –
감사합니다. – user3598351