Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Problem using Hibernate with EJB's

Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a stateless session bean which is using Hibernate.
I set the
<property name="hibernate.session_factory_name">java:hibernate/SessionFactory
in the config file.

and I have a utility class which has the foll. code:
SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();

Session session = sessionFactory.openSession();

When I try to get the Session object in the EJB, I get the foll.exception:

java.lang.NoClassDefFoundError: org/hibernate/Session

Any help would be greatly appreciated.

Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to have hibernate.jar in your classpath.
[ August 22, 2005: Message edited by: Paul Sturrock ]
Everybody! Do the Funky Monkey! Like this tiny ad!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic