Hibernate,将.hbm.xml文件添加到cfg.xml文件中
我需要一些信息 什么是hbm.xml文件???我只知道*.hbm文件 如何将.hbm.xml文件添加到cfg.xml文件 我想知道,因为我在尝试运行jsp时出错,他们说您必须将.hbm.xml文件添加到cfg.xml文件 这就是错误:Hibernate,将.hbm.xml文件添加到cfg.xml文件中,hibernate,jsp,exception,tomcat,hbm,Hibernate,Jsp,Exception,Tomcat,Hbm,我需要一些信息 什么是hbm.xml文件???我只知道*.hbm文件 如何将.hbm.xml文件添加到cfg.xml文件 我想知道,因为我在尝试运行jsp时出错,他们说您必须将.hbm.xml文件添加到cfg.xml文件 这就是错误: exception org.apache.jasper.JasperException:javax.servlet.ServletException:net.sf.hibernate.MappingException:没有用于MyDB.student的持久化程
exception
org.apache.jasper.JasperException:javax.servlet.ServletException:net.sf.hibernate.MappingException:没有用于MyDB.student的持久化程序
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:531)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:439)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:332)
javaservlet.http.HttpServlet.service(HttpServlet.java:722)
原因mère
javax.servlet.ServletException:net.sf.hibernate.MappingException:没有用于MyDB.student的持久器
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:901)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:830)
org.apache.jsp.jsp.index\u jsp.\u jsp服务(index\u jsp.java:103)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:68)
javaservlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:332)
javaservlet.http.HttpServlet.service(HttpServlet.java:722)
原因mère
net.sf.hibernate.MappingException:没有用于MyDB.student的持久化程序
net.sf.hibernate.impl.SessionFactoryImpl.getPersister(SessionFactoryImpl.java:347)
net.sf.hibernate.impl.SessionImpl.getClassPersister(SessionImpl.java:2690)
net.sf.hibernate.impl.SessionImpl.getPersister(SessionImpl.java:2697)
net.sf.hibernate.impl.SessionImpl.SaveWithGenerateIdentifier(SessionImpl.java:763)
net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:738)
org.apache.jsp.jsp.index\u jsp.\u jsp服务(index\u jsp.java:75)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:68)
javaservlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:332)
javaservlet.http.HttpServlet.service(HttpServlet.java:722)
<mapping resource="org/hibernate/auction/Item.hbm.xml"/>
<mapping resource="org/hibernate/auction/Bid.hbm.xml"/>