Announcement Announcement Module
Collapse
No announcement yet.
MVC step-by-step problems Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • MVC step-by-step problems

    I have had continued problems getting the simplest application to work using Spring. I have tried all types of configurations. I am currently using the Spring MVC step-by-step. Everything works fine through Part-1. Once I add the includes and move the jsps under WEB-INF, I have problems. I have corrected the path for the jstl to include jsp in the path.

    locations of files:
    springmvc/war/index.jsp
    springmvc/war/WEB-INF/jsp/includeTop.jsp
    springmvc/war/WEB-INF/jsp/welcome.jsp

    I'm deploying to Tomcat 5.5

    Can someone help?


    root=springmvc
    source directory structure = root/src/java/com/bofa/gcib/gfeds/web/spring/SpringmvcController.java (source is set in the project properties within Eclipse to be root/src/java and root/src/test)



    web.xml:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http&#58;//java.sun.com/dtd/web-app_2_3.dtd'>
    
    <web-app>
    
    <servlet>
        <servlet-name>springmvc</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
    
      <servlet-mapping>
        <servlet-name>springmvc</servlet-name>
        <url-pattern>*.htm</url-pattern>
      </servlet-mapping>
    
      <welcome-file-list>
        <welcome-file>
          index.jsp
        </welcome-file>
      </welcome-file-list>
      
    </web-app>

    springmvc-servlet.xml:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http&#58;//www.springframework.org/dtd/spring-beans.dtd">
    
    <beans>
    
        <bean id="springmvcController" class="com.bofa.gcib.gfeds.web.spring.SpringmvcController"/>
    
        <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
            <property name="mappings">
                <props>
                    <prop key="/welcome.htm">springmvcController</prop>
                </props>
            </property>
        </bean>
    
    </beans>
    SpringmvcController:
    Code:
    package com.bofa.gcib.gfeds.web.spring;
    import java.io.IOException;
    
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    
    import org.springframework.web.servlet.ModelAndView;
    import org.springframework.web.servlet.mvc.Controller;
    
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    
    /**
     * Bank of America Jul 22, 2005
     * 
     * @author Joe Gaber java.com.bofa.gcib.gfeds.web.spring
     */
    public class SpringmvcController implements Controller
    &#123;
    
    	/** Logger for this class and subclasses */
    	protected final Log logger = LogFactory.getLog&#40;getClass&#40;&#41;&#41;;
    
    	/*
    	 * &#40;non-Javadoc&#41;
    	 * 
    	 * @see org.springframework.web.servlet.mvc.Controller#handleRequest&#40;javax.servlet.http.HttpServletRequest,
    	 *      javax.servlet.http.HttpServletResponse&#41;
    	 */
    	@SuppressWarnings&#40;&#123;"unused","nls", "unqualified-field-access"&#125;&#41; //$NON-NLS-1$
    	public ModelAndView handleRequest&#40;HttpServletRequest arg0,
    			HttpServletResponse arg1&#41; throws ServletException, IOException
    	&#123;
    		
    		String now = &#40;new java.util.Date&#40;&#41;&#41;.toString&#40;&#41;;
    		logger.info&#40;"returning welcome view with "&#41;;
    
    		return new ModelAndView&#40;"WEB-INF/jsp/welcome.jsp", "now", now&#41;;
    
    	&#125;
    
    &#125;

    index.jsp:

    Code:
    <%@ include file="/WEB-INF/jsp/includeTop.jsp" %>
    
    <%-- Redirected because we can't set the welcome page to a virtual URL. --%>
    <c&#58;redirect url="/welcome.htm"/>
    welcome.jsp
    Code:
    <%@ include file="/WEB-INF/jsp/includeTop.jsp"%>
    
    <html>
    <head>
    <title>Example &#58;&#58; Spring MVC Application</title>
    </head>
    
    <body>
    <h1>Spring MVC Application - welcome.jsp</h1>
    <br>
    <p>Greetings, it is now <c&#58;out value="$&#123;now&#125;"></p>
    </body>
    </html>

    includeTop.jsp:
    <%@ page session="false" isELIgnored="false"%>

    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

    Tomcat Log:

    Code:
    - Initializing servlet 'springmvc'
    - FrameworkServlet 'springmvc'&#58; initialization started
    - Loading WebApplicationContext for Spring FrameworkServlet 'springmvc'
    - Loading XML bean definitions from ServletContext resource &#91;/WEB-INF/springmvc-servlet.xml&#93;
    - Context initialization failed
    org.springframework.beans.factory.BeanDefinitionStoreException&#58; Error registering bean with name 'springmvcController' defined in ServletContext resource &#91;/WEB-INF/springmvc-servlet.xml&#93;&#58; Bean class &#91;com.bofa.gcib.gfeds.web.SpringmvcController&#93; not found; nested exception is java.lang.ClassNotFoundException&#58; com.bofa.gcib.gfeds.web.SpringmvcController
    java.lang.ClassNotFoundException&#58; com.bofa.gcib.gfeds.web.SpringmvcController
    	at org.apache.catalina.loader.WebappClassLoader.loadClass&#40;WebappClassLoader.java&#58;1332&#41;
    	at org.apache.catalina.loader.WebappClassLoader.loadClass&#40;WebappClassLoader.java&#58;1181&#41;
    	at java.lang.ClassLoader.loadClassInternal&#40;ClassLoader.java&#58;319&#41;
    	at java.lang.Class.forName0&#40;Native Method&#41;
    	at java.lang.Class.forName&#40;Class.java&#58;242&#41;
    	at org.springframework.util.ClassUtils.forName&#40;ClassUtils.java&#58;87&#41;
    	at org.springframework.beans.factory.support.BeanDefinitionReaderUtils.createBeanDefinition&#40;BeanDefinitionReaderUtils.java&#58;62&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement&#40;DefaultXmlBeanDefinitionParser.java&#58;466&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement&#40;DefaultXmlBeanDefinitionParser.java&#58;432&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions&#40;DefaultXmlBeanDefinitionParser.java&#58;369&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions&#40;DefaultXmlBeanDefinitionParser.java&#58;204&#41;
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions&#40;XmlBeanDefinitionReader.java&#58;204&#41;
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions&#40;XmlBeanDefinitionReader.java&#58;162&#41;
    	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions&#40;AbstractBeanDefinitionReader.java&#58;99&#41;
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions&#40;XmlWebApplicationContext.java&#58;115&#41;
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions&#40;XmlWebApplicationContext.java&#58;83&#41;
    	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory&#40;AbstractRefreshableApplicationContext.java&#58;87&#41;
    	at org.springframework.context.support.AbstractApplicationContext.refresh&#40;AbstractApplicationContext.java&#58;262&#41;
    	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh&#40;AbstractRefreshableWebApplicationContext.java&#58;134&#41;
    	at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext&#40;FrameworkServlet.java&#58;305&#41;
    	at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext&#40;FrameworkServlet.java&#58;250&#41;
    	at org.springframework.web.servlet.FrameworkServlet.initServletBean&#40;FrameworkServlet.java&#58;219&#41;
    	at org.springframework.web.servlet.HttpServletBean.init&#40;HttpServletBean.java&#58;111&#41;
    	at javax.servlet.GenericServlet.init&#40;GenericServlet.java&#58;211&#41;
    	at org.apache.catalina.core.StandardWrapper.loadServlet&#40;StandardWrapper.java&#58;1091&#41;
    	at org.apache.catalina.core.StandardWrapper.load&#40;StandardWrapper.java&#58;925&#41;
    	at org.apache.catalina.core.StandardContext.loadOnStartup&#40;StandardContext.java&#58;3857&#41;
    	at org.apache.catalina.core.StandardContext.start&#40;StandardContext.java&#58;4118&#41;
    	at org.apache.catalina.core.ContainerBase.addChildInternal&#40;ContainerBase.java&#58;759&#41;
    	at org.apache.catalina.core.ContainerBase.addChild&#40;ContainerBase.java&#58;739&#41;
    	at org.apache.catalina.core.StandardHost.addChild&#40;StandardHost.java&#58;524&#41;
    	at org.apache.catalina.startup.HostConfig.deployWAR&#40;HostConfig.java&#58;788&#41;
    	at org.apache.catalina.startup.HostConfig.deployWARs&#40;HostConfig.java&#58;677&#41;
    	at org.apache.catalina.startup.HostConfig.deployApps&#40;HostConfig.java&#58;473&#41;
    	at org.apache.catalina.startup.HostConfig.start&#40;HostConfig.java&#58;1102&#41;
    	at org.apache.catalina.startup.HostConfig.lifecycleEvent&#40;HostConfig.java&#58;311&#41;
    	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent&#40;LifecycleSupport.java&#58;119&#41;
    	at org.apache.catalina.core.ContainerBase.start&#40;ContainerBase.java&#58;1020&#41;
    	at org.apache.catalina.core.StandardHost.start&#40;StandardHost.java&#58;718&#41;
    	at org.apache.catalina.core.ContainerBase.start&#40;ContainerBase.java&#58;1012&#41;
    	at org.apache.catalina.core.StandardEngine.start&#40;StandardEngine.java&#58;442&#41;
    	at org.apache.catalina.core.StandardService.start&#40;StandardService.java&#58;450&#41;
    	at org.apache.catalina.core.StandardServer.start&#40;StandardServer.java&#58;683&#41;
    	at org.apache.catalina.startup.Catalina.start&#40;Catalina.java&#58;537&#41;
    	at sun.reflect.NativeMethodAccessorImpl.invoke0&#40;Native Method&#41;
    	at sun.reflect.NativeMethodAccessorImpl.invoke&#40;NativeMethodAccessorImpl.java&#58;39&#41;
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;DelegatingMethodAccessorImpl.java&#58;25&#41;
    	at java.lang.reflect.Method.invoke&#40;Method.java&#58;585&#41;
    	at org.apache.catalina.startup.Bootstrap.start&#40;Bootstrap.java&#58;271&#41;
    	at org.apache.catalina.startup.Bootstrap.main&#40;Bootstrap.java&#58;409&#41;
    - StandardWrapper.Throwable
    org.springframework.beans.factory.BeanDefinitionStoreException&#58; Error registering bean with name 'springmvcController' defined in ServletContext resource &#91;/WEB-INF/springmvc-servlet.xml&#93;&#58; Bean class &#91;com.bofa.gcib.gfeds.web.SpringmvcController&#93; not found; nested exception is java.lang.ClassNotFoundException&#58; com.bofa.gcib.gfeds.web.SpringmvcController
    java.lang.ClassNotFoundException&#58; com.bofa.gcib.gfeds.web.SpringmvcController
    	at org.apache.catalina.loader.WebappClassLoader.loadClass&#40;WebappClassLoader.java&#58;1332&#41;
    	at org.apache.catalina.loader.WebappClassLoader.loadClass&#40;WebappClassLoader.java&#58;1181&#41;
    	at java.lang.ClassLoader.loadClassInternal&#40;ClassLoader.java&#58;319&#41;
    	at java.lang.Class.forName0&#40;Native Method&#41;
    	at java.lang.Class.forName&#40;Class.java&#58;242&#41;
    	at org.springframework.util.ClassUtils.forName&#40;ClassUtils.java&#58;87&#41;
    	at org.springframework.beans.factory.support.BeanDefinitionReaderUtils.createBeanDefinition&#40;BeanDefinitionReaderUtils.java&#58;62&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement&#40;DefaultXmlBeanDefinitionParser.java&#58;466&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement&#40;DefaultXmlBeanDefinitionParser.java&#58;432&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions&#40;DefaultXmlBeanDefinitionParser.java&#58;369&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions&#40;DefaultXmlBeanDefinitionParser.java&#58;204&#41;
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions&#40;XmlBeanDefinitionReader.java&#58;204&#41;
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions&#40;XmlBeanDefinitionReader.java&#58;162&#41;
    	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions&#40;AbstractBeanDefinitionReader.java&#58;99&#41;
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions&#40;XmlWebApplicationContext.java&#58;115&#41;
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions&#40;XmlWebApplicationContext.java&#58;83&#41;
    	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory&#40;AbstractRefreshableApplicationContext.java&#58;87&#41;
    	at org.springframework.context.support.AbstractApplicationContext.refresh&#40;AbstractApplicationContext.java&#58;262&#41;
    	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh&#40;AbstractRefreshableWebApplicationContext.java&#58;134&#41;
    	at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext&#40;FrameworkServlet.java&#58;305&#41;
    	at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext&#40;FrameworkServlet.java&#58;250&#41;
    	at org.springframework.web.servlet.FrameworkServlet.initServletBean&#40;FrameworkServlet.java&#58;219&#41;
    	at org.springframework.web.servlet.HttpServletBean.init&#40;HttpServletBean.java&#58;111&#41;
    	at javax.servlet.GenericServlet.init&#40;GenericServlet.java&#58;211&#41;
    	at org.apache.catalina.core.StandardWrapper.loadServlet&#40;StandardWrapper.java&#58;1091&#41;
    	at org.apache.catalina.core.StandardWrapper.load&#40;StandardWrapper.java&#58;925&#41;
    	at org.apache.catalina.core.StandardContext.loadOnStartup&#40;StandardContext.java&#58;3857&#41;
    	at org.apache.catalina.core.StandardContext.start&#40;StandardContext.java&#58;4118&#41;
    	at org.apache.catalina.core.ContainerBase.addChildInternal&#40;ContainerBase.java&#58;759&#41;
    	at org.apache.catalina.core.ContainerBase.addChild&#40;ContainerBase.java&#58;739&#41;
    	at org.apache.catalina.core.StandardHost.addChild&#40;StandardHost.java&#58;524&#41;
    	at org.apache.catalina.startup.HostConfig.deployWAR&#40;HostConfig.java&#58;788&#41;
    	at org.apache.catalina.startup.HostConfig.deployWARs&#40;HostConfig.java&#58;677&#41;
    	at org.apache.catalina.startup.HostConfig.deployApps&#40;HostConfig.java&#58;473&#41;
    	at org.apache.catalina.startup.HostConfig.start&#40;HostConfig.java&#58;1102&#41;
    	at org.apache.catalina.startup.HostConfig.lifecycleEvent&#40;HostConfig.java&#58;311&#41;
    	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent&#40;LifecycleSupport.java&#58;119&#41;
    	at org.apache.catalina.core.ContainerBase.start&#40;ContainerBase.java&#58;1020&#41;
    	at org.apache.catalina.core.StandardHost.start&#40;StandardHost.java&#58;718&#41;
    	at org.apache.catalina.core.ContainerBase.start&#40;ContainerBase.java&#58;1012&#41;
    	at org.apache.catalina.core.StandardEngine.start&#40;StandardEngine.java&#58;442&#41;
    	at org.apache.catalina.core.StandardService.start&#40;StandardService.java&#58;450&#41;
    	at org.apache.catalina.core.StandardServer.start&#40;StandardServer.java&#58;683&#41;
    	at org.apache.catalina.startup.Catalina.start&#40;Catalina.java&#58;537&#41;
    	at sun.reflect.NativeMethodAccessorImpl.invoke0&#40;Native Method&#41;
    	at sun.reflect.NativeMethodAccessorImpl.invoke&#40;NativeMethodAccessorImpl.java&#58;39&#41;
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;DelegatingMethodAccessorImpl.java&#58;25&#41;
    	at java.lang.reflect.Method.invoke&#40;Method.java&#58;585&#41;
    	at org.apache.catalina.startup.Bootstrap.start&#40;Bootstrap.java&#58;271&#41;
    	at org.apache.catalina.startup.Bootstrap.main&#40;Bootstrap.java&#58;409&#41;
    - Servlet /springmvc threw load&#40;&#41; exception
    org.springframework.beans.factory.BeanDefinitionStoreException&#58; Error registering bean with name 'springmvcController' defined in ServletContext resource &#91;/WEB-INF/springmvc-servlet.xml&#93;&#58; Bean class &#91;com.bofa.gcib.gfeds.web.SpringmvcController&#93; not found; nested exception is java.lang.ClassNotFoundException&#58; com.bofa.gcib.gfeds.web.SpringmvcController
    java.lang.ClassNotFoundException&#58; com.bofa.gcib.gfeds.web.SpringmvcController
    	at org.apache.catalina.loader.WebappClassLoader.loadClass&#40;WebappClassLoader.java&#58;1332&#41;
    	at org.apache.catalina.loader.WebappClassLoader.loadClass&#40;WebappClassLoader.java&#58;1181&#41;
    	at java.lang.ClassLoader.loadClassInternal&#40;ClassLoader.java&#58;319&#41;
    	at java.lang.Class.forName0&#40;Native Method&#41;
    	at java.lang.Class.forName&#40;Class.java&#58;242&#41;
    	at org.springframework.util.ClassUtils.forName&#40;ClassUtils.java&#58;87&#41;
    	at org.springframework.beans.factory.support.BeanDefinitionReaderUtils.createBeanDefinition&#40;BeanDefinitionReaderUtils.java&#58;62&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement&#40;DefaultXmlBeanDefinitionParser.java&#58;466&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement&#40;DefaultXmlBeanDefinitionParser.java&#58;432&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions&#40;DefaultXmlBeanDefinitionParser.java&#58;369&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions&#40;DefaultXmlBeanDefinitionParser.java&#58;204&#41;
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions&#40;XmlBeanDefinitionReader.java&#58;204&#41;
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions&#40;XmlBeanDefinitionReader.java&#58;162&#41;
    	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions&#40;AbstractBeanDefinitionReader.java&#58;99&#41;
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions&#40;XmlWebApplicationContext.java&#58;115&#41;
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions&#40;XmlWebApplicationContext.java&#58;83&#41;
    	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory&#40;AbstractRefreshableApplicationContext.java&#58;87&#41;
    	at org.springframework.context.support.AbstractApplicationContext.refresh&#40;AbstractApplicationContext.java&#58;262&#41;
    	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh&#40;AbstractRefreshableWebApplicationContext.java&#58;134&#41;
    	at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext&#40;FrameworkServlet.java&#58;305&#41;
    	at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext&#40;FrameworkServlet.java&#58;250&#41;
    	at org.springframework.web.servlet.FrameworkServlet.initServletBean&#40;FrameworkServlet.java&#58;219&#41;
    	at org.springframework.web.servlet.HttpServletBean.init&#40;HttpServletBean.java&#58;111&#41;
    	at javax.servlet.GenericServlet.init&#40;GenericServlet.java&#58;211&#41;
    	at org.apache.catalina.core.StandardWrapper.loadServlet&#40;StandardWrapper.java&#58;1091&#41;
    	at org.apache.catalina.core.StandardWrapper.load&#40;StandardWrapper.java&#58;925&#41;
    	at org.apache.catalina.core.StandardContext.loadOnStartup&#40;StandardContext.java&#58;3857&#41;
    	at org.apache.catalina.core.StandardContext.start&#40;StandardContext.java&#58;4118&#41;
    	at org.apache.catalina.core.ContainerBase.addChildInternal&#40;ContainerBase.java&#58;759&#41;
    	at org.apache.catalina.core.ContainerBase.addChild&#40;ContainerBase.java&#58;739&#41;
    	at org.apache.catalina.core.StandardHost.addChild&#40;StandardHost.java&#58;524&#41;
    	at org.apache.catalina.startup.HostConfig.deployWAR&#40;HostConfig.java&#58;788&#41;
    	at org.apache.catalina.startup.HostConfig.deployWARs&#40;HostConfig.java&#58;677&#41;
    	at org.apache.catalina.startup.HostConfig.deployApps&#40;HostConfig.java&#58;473&#41;
    	at org.apache.catalina.startup.HostConfig.start&#40;HostConfig.java&#58;1102&#41;
    	at org.apache.catalina.startup.HostConfig.lifecycleEvent&#40;HostConfig.java&#58;311&#41;
    	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent&#40;LifecycleSupport.java&#58;119&#41;
    	at org.apache.catalina.core.ContainerBase.start&#40;ContainerBase.java&#58;1020&#41;
    	at org.apache.catalina.core.StandardHost.start&#40;StandardHost.java&#58;718&#41;
    	at org.apache.catalina.core.ContainerBase.start&#40;ContainerBase.java&#58;1012&#41;
    	at org.apache.catalina.core.StandardEngine.start&#40;StandardEngine.java&#58;442&#41;
    	at org.apache.catalina.core.StandardService.start&#40;StandardService.java&#58;450&#41;
    	at org.apache.catalina.core.StandardServer.start&#40;StandardServer.java&#58;683&#41;
    	at org.apache.catalina.startup.Catalina.start&#40;Catalina.java&#58;537&#41;
    	at sun.reflect.NativeMethodAccessorImpl.invoke0&#40;Native Method&#41;
    	at sun.reflect.NativeMethodAccessorImpl.invoke&#40;NativeMethodAccessorImpl.java&#58;39&#41;
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;DelegatingMethodAccessorImpl.java&#58;25&#41;
    	at java.lang.reflect.Method.invoke&#40;Method.java&#58;585&#41;
    	at org.apache.catalina.startup.Bootstrap.start&#40;Bootstrap.java&#58;271&#41;
    	at org.apache.catalina.startup.Bootstrap.main&#40;Bootstrap.java&#58;409&#41;
    - Initializing servlet 'springmvc'
    - FrameworkServlet 'springmvc'&#58; initialization started
    - Loading WebApplicationContext for Spring FrameworkServlet 'springmvc'
    - Loading XML bean definitions from ServletContext resource &#91;/WEB-INF/springmvc-servlet.xml&#93;
    - Context initialization failed
    org.springframework.beans.factory.BeanDefinitionStoreException&#58; Error registering bean with name 'springmvcController' defined in ServletContext resource &#91;/WEB-INF/springmvc-servlet.xml&#93;&#58; Bean class &#91;com.bofa.gcib.gfeds.web.SpringmvcController&#93; not found; nested exception is java.lang.ClassNotFoundException&#58; com.bofa.gcib.gfeds.web.SpringmvcController
    java.lang.ClassNotFoundException&#58; com.bofa.gcib.gfeds.web.SpringmvcController
    	at org.apache.catalina.loader.WebappClassLoader.loadClass&#40;WebappClassLoader.java&#58;1332&#41;
    	at org.apache.catalina.loader.WebappClassLoader.loadClass&#40;WebappClassLoader.java&#58;1181&#41;
    	at java.lang.ClassLoader.loadClassInternal&#40;ClassLoader.java&#58;319&#41;
    	at java.lang.Class.forName0&#40;Native Method&#41;
    	at java.lang.Class.forName&#40;Class.java&#58;242&#41;
    	at org.springframework.util.ClassUtils.forName&#40;ClassUtils.java&#58;87&#41;
    	at org.springframework.beans.factory.support.BeanDefinitionReaderUtils.createBeanDefinition&#40;BeanDefinitionReaderUtils.java&#58;62&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement&#40;DefaultXmlBeanDefinitionParser.java&#58;466&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement&#40;DefaultXmlBeanDefinitionParser.java&#58;432&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions&#40;DefaultXmlBeanDefinitionParser.java&#58;369&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions&#40;DefaultXmlBeanDefinitionParser.java&#58;204&#41;
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions&#40;XmlBeanDefinitionReader.java&#58;204&#41;
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions&#40;XmlBeanDefinitionReader.java&#58;162&#41;
    	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions&#40;AbstractBeanDefinitionReader.java&#58;99&#41;
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions&#40;XmlWebApplicationContext.java&#58;115&#41;
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions&#40;XmlWebApplicationContext.java&#58;83&#41;
    	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory&#40;AbstractRefreshableApplicationContext.java&#58;87&#41;
    	at org.springframework.context.support.AbstractApplicationContext.refresh&#40;AbstractApplicationContext.java&#58;262&#41;
    	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh&#40;AbstractRefreshableWebApplicationContext.java&#58;134&#41;
    	at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext&#40;FrameworkServlet.java&#58;305&#41;
    	at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext&#40;FrameworkServlet.java&#58;250&#41;
    	at org.springframework.web.servlet.FrameworkServlet.initServletBean&#40;FrameworkServlet.java&#58;219&#41;
    	at org.springframework.web.servlet.HttpServletBean.init&#40;HttpServletBean.java&#58;111&#41;
    	at javax.servlet.GenericServlet.init&#40;GenericServlet.java&#58;211&#41;
    	at org.apache.catalina.core.StandardWrapper.loadServlet&#40;StandardWrapper.java&#58;1091&#41;
    	at org.apache.catalina.core.StandardWrapper.allocate&#40;StandardWrapper.java&#58;750&#41;
    	at org.apache.catalina.core.StandardWrapperValve.invoke&#40;StandardWrapperValve.java&#58;130&#41;
    	at org.apache.catalina.core.StandardContextValve.invoke&#40;StandardContextValve.java&#58;178&#41;
    	at org.apache.catalina.core.StandardHostValve.invoke&#40;StandardHostValve.java&#58;126&#41;
    	at org.apache.catalina.valves.ErrorReportValve.invoke&#40;ErrorReportValve.java&#58;105&#41;
    	at org.apache.catalina.core.StandardEngineValve.invoke&#40;StandardEngineValve.java&#58;107&#41;
    	at org.apache.catalina.connector.CoyoteAdapter.service&#40;CoyoteAdapter.java&#58;148&#41;
    	at org.apache.coyote.http11.Http11Processor.process&#40;Http11Processor.java&#58;856&#41;
    	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection&#40;Http11Protocol.java&#58;744&#41;
    	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket&#40;PoolTcpEndpoint.java&#58;527&#41;
    	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt&#40;LeaderFollowerWorkerThread.java&#58;80&#41;
    	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run&#40;ThreadPool.java&#58;684&#41;
    	at java.lang.Thread.run&#40;Thread.java&#58;595&#41;
    - StandardWrapper.Throwable
    org.springframework.beans.factory.BeanDefinitionStoreException&#58; Error registering bean with name 'springmvcController' defined in ServletContext resource &#91;/WEB-INF/springmvc-servlet.xml&#93;&#58; Bean class &#91;com.bofa.gcib.gfeds.web.SpringmvcController&#93; not found; nested exception is java.lang.ClassNotFoundException&#58; com.bofa.gcib.gfeds.web.SpringmvcController
    java.lang.ClassNotFoundException&#58; com.bofa.gcib.gfeds.web.SpringmvcController
    	at org.apache.catalina.loader.WebappClassLoader.loadClass&#40;WebappClassLoader.java&#58;1332&#41;
    	at org.apache.catalina.loader.WebappClassLoader.loadClass&#40;WebappClassLoader.java&#58;1181&#41;
    	at java.lang.ClassLoader.loadClassInternal&#40;ClassLoader.java&#58;319&#41;
    	at java.lang.Class.forName0&#40;Native Method&#41;
    	at java.lang.Class.forName&#40;Class.java&#58;242&#41;
    	at org.springframework.util.ClassUtils.forName&#40;ClassUtils.java&#58;87&#41;
    	at org.springframework.beans.factory.support.BeanDefinitionReaderUtils.createBeanDefinition&#40;BeanDefinitionReaderUtils.java&#58;62&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement&#40;DefaultXmlBeanDefinitionParser.java&#58;466&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement&#40;DefaultXmlBeanDefinitionParser.java&#58;432&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions&#40;DefaultXmlBeanDefinitionParser.java&#58;369&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions&#40;DefaultXmlBeanDefinitionParser.java&#58;204&#41;
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions&#40;XmlBeanDefinitionReader.java&#58;204&#41;
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions&#40;XmlBeanDefinitionReader.java&#58;162&#41;
    	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions&#40;AbstractBeanDefinitionReader.java&#58;99&#41;
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions&#40;XmlWebApplicationContext.java&#58;115&#41;
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions&#40;XmlWebApplicationContext.java&#58;83&#41;
    	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory&#40;AbstractRefreshableApplicationContext.java&#58;87&#41;
    	at org.springframework.context.support.AbstractApplicationContext.refresh&#40;AbstractApplicationContext.java&#58;262&#41;
    	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh&#40;AbstractRefreshableWebApplicationContext.java&#58;134&#41;
    	at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext&#40;FrameworkServlet.java&#58;305&#41;
    	at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext&#40;FrameworkServlet.java&#58;250&#41;
    	at org.springframework.web.servlet.FrameworkServlet.initServletBean&#40;FrameworkServlet.java&#58;219&#41;
    	at org.springframework.web.servlet.HttpServletBean.init&#40;HttpServletBean.java&#58;111&#41;
    	at javax.servlet.GenericServlet.init&#40;GenericServlet.java&#58;211&#41;
    	at org.apache.catalina.core.StandardWrapper.loadServlet&#40;StandardWrapper.java&#58;1091&#41;
    	at org.apache.catalina.core.StandardWrapper.allocate&#40;StandardWrapper.java&#58;750&#41;
    	at org.apache.catalina.core.StandardWrapperValve.invoke&#40;StandardWrapperValve.java&#58;130&#41;
    	at org.apache.catalina.core.StandardContextValve.invoke&#40;StandardContextValve.java&#58;178&#41;
    	at org.apache.catalina.core.StandardHostValve.invoke&#40;StandardHostValve.java&#58;126&#41;
    	at org.apache.catalina.valves.ErrorReportValve.invoke&#40;ErrorReportValve.java&#58;105&#41;
    	at org.apache.catalina.core.StandardEngineValve.invoke&#40;StandardEngineValve.java&#58;107&#41;
    	at org.apache.catalina.connector.CoyoteAdapter.service&#40;CoyoteAdapter.java&#58;148&#41;
    	at org.apache.coyote.http11.Http11Processor.process&#40;Http11Processor.java&#58;856&#41;
    	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection&#40;Http11Protocol.java&#58;744&#41;
    	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket&#40;PoolTcpEndpoint.java&#58;527&#41;
    	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt&#40;LeaderFollowerWorkerThread.java&#58;80&#41;
    	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run&#40;ThreadPool.java&#58;684&#41;
    	at java.lang.Thread.run&#40;Thread.java&#58;595&#41;
    - Allocate exception for servlet springmvc
    org.springframework.beans.factory.BeanDefinitionStoreException&#58; Error registering bean with name 'springmvcController' defined in ServletContext resource &#91;/WEB-INF/springmvc-servlet.xml&#93;&#58; Bean class &#91;com.bofa.gcib.gfeds.web.SpringmvcController&#93; not found; nested exception is java.lang.ClassNotFoundException&#58; com.bofa.gcib.gfeds.web.SpringmvcController
    java.lang.ClassNotFoundException&#58; com.bofa.gcib.gfeds.web.SpringmvcController
    	at org.apache.catalina.loader.WebappClassLoader.loadClass&#40;WebappClassLoader.java&#58;1332&#41;
    	at org.apache.catalina.loader.WebappClassLoader.loadClass&#40;WebappClassLoader.java&#58;1181&#41;
    	at java.lang.ClassLoader.loadClassInternal&#40;ClassLoader.java&#58;319&#41;
    	at java.lang.Class.forName0&#40;Native Method&#41;
    	at java.lang.Class.forName&#40;Class.java&#58;242&#41;
    	at org.springframework.util.ClassUtils.forName&#40;ClassUtils.java&#58;87&#41;
    	at org.springframework.beans.factory.support.BeanDefinitionReaderUtils.createBeanDefinition&#40;BeanDefinitionReaderUtils.java&#58;62&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement&#40;DefaultXmlBeanDefinitionParser.java&#58;466&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement&#40;DefaultXmlBeanDefinitionParser.java&#58;432&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions&#40;DefaultXmlBeanDefinitionParser.java&#58;369&#41;
    	at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions&#40;DefaultXmlBeanDefinitionParser.java&#58;204&#41;
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions&#40;XmlBeanDefinitionReader.java&#58;204&#41;
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions&#40;XmlBeanDefinitionReader.java&#58;162&#41;
    	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions&#40;AbstractBeanDefinitionReader.java&#58;99&#41;
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions&#40;XmlWebApplicationContext.java&#58;115&#41;
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions&#40;XmlWebApplicationContext.java&#58;83&#41;
    	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory&#40;AbstractRefreshableApplicationContext.java&#58;87&#41;
    	at org.springframework.context.support.AbstractApplicationContext.refresh&#40;AbstractApplicationContext.java&#58;262&#41;
    	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh&#40;AbstractRefreshableWebApplicationContext.java&#58;134&#41;
    	at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext&#40;FrameworkServlet.java&#58;305&#41;
    	at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext&#40;FrameworkServlet.java&#58;250&#41;
    	at org.springframework.web.servlet.FrameworkServlet.initServletBean&#40;FrameworkServlet.java&#58;219&#41;
    	at org.springframework.web.servlet.HttpServletBean.init&#40;HttpServletBean.java&#58;111&#41;
    	at javax.servlet.GenericServlet.init&#40;GenericServlet.java&#58;211&#41;
    	at org.apache.catalina.core.StandardWrapper.loadServlet&#40;StandardWrapper.java&#58;1091&#41;
    	at org.apache.catalina.core.StandardWrapper.allocate&#40;StandardWrapper.java&#58;750&#41;
    	at org.apache.catalina.core.StandardWrapperValve.invoke&#40;StandardWrapperValve.java&#58;130&#41;
    	at org.apache.catalina.core.StandardContextValve.invoke&#40;StandardContextValve.java&#58;178&#41;
    	at org.apache.catalina.core.StandardHostValve.invoke&#40;StandardHostValve.java&#58;126&#41;
    	at org.apache.catalina.valves.ErrorReportValve.invoke&#40;ErrorReportValve.java&#58;105&#41;
    	at org.apache.catalina.core.StandardEngineValve.invoke&#40;StandardEngineValve.java&#58;107&#41;
    	at org.apache.catalina.connector.CoyoteAdapter.service&#40;CoyoteAdapter.java&#58;148&#41;
    	at org.apache.coyote.http11.Http11Processor.process&#40;Http11Processor.java&#58;856&#41;
    	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection&#40;Http11Protocol.java&#58;744&#41;
    	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket&#40;PoolTcpEndpoint.java&#58;527&#41;
    	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt&#40;LeaderFollowerWorkerThread.java&#58;80&#41;
    	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run&#40;ThreadPool.java&#58;684&#41;
    	at java.lang.Thread.run&#40;Thread.java&#58;595&#41;

  • #2
    Compiled class fields

    It appears to me as if your compiled class file is not being found by the app server you are using.

    In eclipse, have you set your src directory to put the compiled classes into the /WEB-INF/classes/ directory ?



    Bill

    Comment


    • #3
      It is amazing that the more you do something, its the basics that bite you in the...you know what. Thank you for taking the time to response to an obviously lame post. You are exactly right as to the problem. I get very lazy and didn't look in my build.dir to see what was going on. The entire class directory is missing, probably because of some change make in my build.xml.

      Thanks again,

      Comment

      Working...
      X