Announcement Announcement Module
Collapse
No announcement yet.
ClassNotFoundException on beans in ServletContext resource Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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(WebappClassLoader.java:1352)
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1198)
    at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:242)
    at org.springframework.util.ClassUtils.forName(ClassU tils.java:109)
    at org.springframework.beans.factory.support.BeanDefi nitionReaderUtils.createBeanDefinition(BeanDefinit ionReaderUtils.java:65)
    at org.springframework.beans.factory.xml.DefaultXmlBe anDefinitionParser.parseBeanDefinitionElement(Defa ultXmlBeanDefinitionParser.java:466)


    here is my web.xml:
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
    /WEB-INF/dataAccessContext.xml /WEB-INF/applicationContext.xml
    </param-value>
    </context-param>

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

    thanks
Working...
X