• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem using Hibernate with EJB's

 
Megan Troy
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a stateless session bean which is using Hibernate.
I set the
<property name="hibernate.session_factory_name">java:hibernate/SessionFactory
</property>
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.

Thanks,
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate 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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic