facebook

[Closed] hibernate3 configuration class not found

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #239032 Reply

    mksoft
    Member

    Hello,

    I’m testing a hessian service with spring and hibernate under tomcat 5.5.9. Using MyEclipse Build id: 20050829-4.0.0-GA

    Trying to access the service, I’m getting:

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘statusSessionFactory’ defined in ServletContext resource [/WEB-INF/services-servlet.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: net/sf/hibernate/cfg/Configuration

    I’ve set myeclipse to deploy the jars as well, and hibernate3.jar is in WEB-INF/lib.

    Looking in hibernate3.jar suggests that the class should be:
    org/hibernate/cfg/Configuration

    instead of net/sf/hibernate/cfg/Configuration.

    I have no idea how to fix it.
    Thanks.

    #239035 Reply

    Riyad Kalla
    Member

    mksoft,
    The problem may be an issue between Hibernate3 (hibernate3.jar) and Hibernate2 (hibernate2.jar). Have you tried creating a new dummy Web Project, add Hibernate capabilities to it, selecting Hibernate 2, and then open up the HIbernate2.jar file and drill down and see if the package path matches what Spring is looking for.

    #239039 Reply

    mksoft
    Member

    support-rkalla, spring was added via MyEclipse’s Spring capabilities.

    You’re suggesting that hibernate3 isn’t supported by the version of spring provided by MyEclipse ❓

    If so, how can it be fixed ❓

    #239043 Reply

    Brian Fernandes
    Moderator

    mksoft,

    Hibernate 3 is supported by the version of Spring in MyEclipse 4.0.

    However, you are probably using the Hibernate2 class in Spring instead of the Hibernate3 variant.

    For example:
    for Hibernate 2 use
    org.springframework.orm.hibernate.LocalSessionFactoryBean

    but for Hibernate 3 use
    org.springframework.orm.hibernate3.LocalSessionFactoryBean

    Hope this helps,
    Brian.

    #239060 Reply

    mksoft
    Member

    Thanks a lot Brian.

    That was the issue indeed 🙂

    #239061 Reply

    Brian Fernandes
    Moderator

    Glad you got it working 🙂

    Brian.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: [Closed] hibernate3 configuration class not found

You must be logged in to post in the forum log in