hibernate配置问题

zhang11wu4 2006-03-04 10:15:28
tomcat5.5.15和hibernate3结合运行时出现如下错误,这是什么原因,请高手赐教:
HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Could not parse configuration: /hibernate.cfg.xml
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1376)
org.hibernate.cfg.Configuration.configure(Configuration.java:1310)
org.hibernate.cfg.Configuration.configure(Configuration.java:1296)
com.hellking.study.hibernate.HibernateBase.initHibernate(HibernateBase.java:22)
com.hellking.study.hibernate.HibernateBase.<init>(HibernateBase.java:16)
com.hellking.study.hibernate.CourseBean.<init>(CourseBean.java:9)
org.apache.jsp.course_jsp._jspService(org.apache.jsp.course_jsp:68)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.15 logs.


--------------------------------------------------------------------------------

Apache Tomcat/5.5.15
...全文
41 点赞 收藏 3
写回复
3 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
zhang11wu4 2006-03-04
这是我的hibernate.cfg.xml文件,它的DTD在哪里呀?
<?xml version="1.0"?>
<!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/hibernate</property>
<property name="show_sql">false</property>
<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
<!--Mapping files-->
<mapping resource="Courses.hbm.xml"/>
</session-factory>
</hibernate-configuration>
回复
woolceo 2006-03-04
你看看你的hibernate.cfg.xml是否按照他的dtd那么写...
回复
woolceo 2006-03-04
Could not parse configuration: /hibernate.cfg.xml
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2006-03-04 10:15
社区公告
暂无公告