Announcement Announcement Module
No announcement yet.
ClassNotFoundException on beans in ServletContext resource Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • ClassNotFoundException on beans in ServletContext resource

    im using spring with tomcat and jdk1.5, i use iBatis for ORM, i have an entry in my dataAccessContext.xml for my dao bean:

    <bean id="userDao" class="com.groovemobile.webportal.dao.user.SqlMapU serDao">

    my SqlMapUserDAO class is located under WEB-INF/classes, i also created a jar containing all my classes and put it in WEB-INF/lib, but when i start my tomcat, i get this exception:

    2006-07-26 12:53:53,343 ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed
    org.springframework.beans.factory.BeanDefinitionSt oreException: Error registering bean with name 'userDao' defined in ServletContext resource [/WEB-INF/dataAccessContext.xml]: Bean class [com.groovemobile.webportal.dao.user.SqlMapUserDao] not found; nested exception is java.lang.ClassNotFoundException: com.groovemobile.webportal.dao.user.SqlMapUserDao
    java.lang.ClassNotFoundException: com.groovemobile.webportal.dao.user.SqlMapUserDao
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(
    at java.lang.ClassLoader.loadClassInternal(ClassLoade
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(
    at org.springframework.util.ClassUtils.forName(ClassU
    at nitionReaderUtils.createBeanDefinition(BeanDefinit
    at org.springframework.beans.factory.xml.DefaultXmlBe anDefinitionParser.parseBeanDefinitionElement(Defa

    here is my web.xml:
    /WEB-INF/dataAccessContext.xml /WEB-INF/applicationContext.xml

    am i missing something here? i based my codes from the JPetstore example of spring.