Results 1 to 2 of 2

Thread: Spring can't find a lib and webapp doesn't start up in tomcat 6

Hybrid View

  1. #1

    Default Spring can't find a lib and webapp doesn't start up in tomcat 6

    Hello,
    this is my first post in this forum (which I think I will use toroughly in the future), so I apologize in advance if I posted in the wrong category. The fact is that I'm using STS, so it seemed the right one.

    Anyway, that's the problem: I'm building a simple Spring app, just to try out features like MVC and persistence. Now I've created something very simple, out of a bunch of tutorials for Spring 3, that I'm using. The application fails with this, during server startup:


    Code:
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean] for bean with name 'mySessionFactory' defined in ServletContext resource [/WEB-INF/spring/appServlet/servlet-context.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean
    but I've org.springframework.orm in web-inf/classes folder (I even tried putting it in web-inf/lib). As I copied these libs there, the came out in Web App Libraries folder. Building this project in STS works fine as this dependency is set up in build path throught project properties, but how do I transfer the libs to the web app? (I'm using Tomcat 6 as it is the server I'm going to use sometime in the future for production). Is this a config problem of my XML? Or am I just missing the right way to put this lib? (I encountered the same problem before, but adding the needed lib in classes worked it out).

    Thanks

  2. #2
    Join Date
    Feb 2011
    Posts
    1

    Default

    I'm having the same problem. I have all the spring libraries in WEB-INF/lib too. My error isn't exactly but I'm getting the CLASSNOTFOUNDEXCEPTION on org.springframework.orm.hibernate3.annotation.Anno tationSessionFactoryBean.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •