Hibernate version: 3.0 and 3.1rc1
Mapping documents: none
Hi have succesfully use hibernate in a plain Tomcat 4.1 environment just fine, your quickStart guide is execelent!!
However I am working with Eclipse Plugin from Exadel. Using Struts and Hibernate together under Tomcat 5.0. I am using Exadel's Struts project layout have a basic struts app working. However I add Hibernate (following quickStart) and I get exceptions while creating a SessionFactory.
I created a new, plain page, with the following line
Code:
SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
I get the folowing error:
Code:
exception
javax.servlet.ServletException: javax/transaction/SystemException
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.index_jsp._jspService(index_jsp.java:108)
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)
root cause
java.lang.NoClassDefFoundError: javax/transaction/SystemException
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:140)
org.hibernate.id.IdentifierGeneratorFactory.class$(IdentifierGeneratorFactory.java:25)
org.hibernate.id.IdentifierGeneratorFactory.<clinit>(IdentifierGeneratorFactory.java:76)
org.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:152)
org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:183)
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1145)
org.apache.jsp.index_jsp._jspService(index_jsp.java:77)
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)
I cannot duplicate this error message with other, working projects, so I'm a bit confused where to turn.
On another debug note, I even broke down the SessionFactory build line above to make smaller sections....
Code:
Configuration cfg = new Configuration();
This works (finds the hibrnate.cfg.xml file)! It just can't seem to build the full Factory! :-/
-Joe