java.lang.ClassNotFoundException: com.springhibernatemvc.dao.PersonDAOImpl
<p>I am having an error in my servlet-context.xml. It is saying that it can find the below classes but there actually exist in the projecct folder.</p>

<pre><code>&lt;beans:bean id="personDAO" class="com.springhibernatemvc.dao.PersonDAOImpl"&gt;
        &lt;beans:property name="sessionFactory" ref="hibernate4AnnotatedSessionFactory" /&gt;
    &lt;/beans:bean&gt;
    &lt;beans:bean id="personService" class="com.springbibernate.services.PersonServiceImpl"&gt;
        &lt;beans:property name="personDAO" ref="personDAO"&gt;&lt;/beans:property&gt;
    &lt;/beans:bean&gt;
</code></pre>

<p>It is saying that this class is not found </p>

<pre><code>- Class 'com.springbibernate.services.PersonServiceImpl' 
</code></pre>

<p>My servlet-context file is also defined in my web.xml file</p>

<pre><code>&lt;servlet&gt;
        &lt;servlet-name&gt;appServlet&lt;/servlet-name&gt;
        &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
        &lt;init-param&gt;
            &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
            &lt;param-value&gt;/WEB-INF/spring/appServlet/servlet-context.xml&lt;/param-value&gt;
        &lt;/init-param&gt;
        &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
</code></pre>

<p>I have adding servlet-context.xml to the root folder of my web app but still the error exists.</p>

<p>Complete stacktrace</p>

<pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0': Invocation of init method failed; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.springhibernatemvc.dao.PersonDAOImpl] for bean with name 'personDAO' defined in ServletContext resource [/WEB-INF/spring/appServlet/servlet-context.xml]; nested exception is java.lang.ClassNotFoundException: com.springhibernatemvc.dao.PersonDAOImpl
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.springhibernatemvc.dao.PersonDAOImpl] for bean with name 'personDAO' defined in ServletContext resource [/WEB-INF/spring/appServlet/servlet-context.xml]; nested exception is java.lang.ClassNotFoundException: com.springhibernatemvc.dao.PersonDAOImpl
</code></pre>

<p>What could be wrong?</p>