Hallo,
dieses Problem tritt bei mir auf, obwohl ich mich an den Aufbau der Tutorials von
www.hibernate.org halte.
Hibernate version:
Hibernate 3
Mapping documents:
hibernate.cfg.xml:
<mapping resource="snare/webInterface/database/Sequences.hbm.xml" />
Sequences.hbm.xml:
<class name="snare.webInterface.database.Sequences" table="sequences">
Code between sessionFactory.openSession() and session.close():
session.beginTransaction();
ArrayList rs = (ArrayList)session.createQuery("FROM sequences s").list();
session.beginTransaction().commit();
Full stack trace of any exception that occurs:
javax.servlet.ServletException: javax.servlet.jsp.JspException: javax.faces.FacesException: javax.faces.FacesException: Can't instantiate class: 'snare.webInterface.database.SequencesData'.. class snare.webInterface.database.SequencesData : org.hibernate.hql.ast.QuerySyntaxException: sequences is not mapped. [FROM sequences s]
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:842)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.snarePage_jsp._jspService(snarePage_jsp.java:86)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198
Name and version of the database you are using:
MySql 5.0.15-0
Alle im Netz befindlichen Lösungen haben mir nicht weiter geholfen. Ich hoffe hier kann mir jemand helfen.
Vielen Dank!