-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: SessionFactory with Exadel Studio and Hibernate 3.x
PostPosted: Tue Oct 11, 2005 4:01 pm 
Newbie

Joined: Tue Oct 11, 2005 3:31 pm
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.