springmvc配置错误,很像找不到springmvc的servlet
web.xml<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www. xmlns="http://java. xsi:schemaLocation="http://java. http://java. id="WebApp_ID" version="3.0">
<display-name>SpringmvcTest</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list><context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring-servlet.xml</param-value>
</context-param>
<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>*.spring</url-pattern>
</servlet-mapping>
</web-app>
spring-servlet.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.
xmlns:xsi="http://www.
xmlns:p="http://www.
xmlns:context="http://www.
xsi:schemaLocation="
http://www.
classpath:/org/springframework/beans/factory/xml/spring-beans-4.1.xsd
http://www.
http://www.
<context:component-scan base-package="com.quchangwen.springmvctest.controller"></context:component-scan>
</beans>
控制台错误信息:
严重: StandardWrapper.Throwable
java.lang.NullPointerException
at org.springframework.core.SerializableTypeWrapper$TypeProxyInvocationHandler.invoke(SerializableTypeWrapper.java:239)
at org.springframework.core.$Proxy4.hashCode(Unknown Source)
at org.springframework.util.ObjectUtils.nullSafeHashCode(ObjectUtils.java:273)
at org.springframework.core.ResolvableType.hashCode(ResolvableType.java:811)
at org.springframework.util.ConcurrentReferenceHashMap.getHash(ConcurrentReferenceHashMap.java:214)
at org.springframework.util.ConcurrentReferenceHashMap.getReference(ConcurrentReferenceHashMap.java:246)
at org.springframework.util.ConcurrentReferenceHashMap.get(ConcurrentReferenceHashMap.java:226)
at org.springframework.core.ResolvableType.forType(ResolvableType.java:1198)
at org.springframework.core.ResolvableType.forType(ResolvableType.java:1177)
at org.springframework.core.ResolvableType.forTypes(ResolvableType.java:856)
at org.springframework.core.ResolvableType.getInterfaces(ResolvableType.java:403)
at org.springframework.core.ResolvableType.as(ResolvableType.java:365)
at org.springframework.core.convert.support.GenericConversionService.getRequiredTypeInfo(GenericConversionService.java:286)
at org.springframework.core.convert.support.GenericConversionService.addConverterFactory(GenericConversionService.java:118)
at org.springframework.core.convert.support.DefaultConversionService.addScalarConverters(DefaultConversionService.java:86)
at org.springframework.core.convert.support.DefaultConversionService.addDefaultConverters(DefaultConversionService.java:67)
at org.springframework.core.convert.support.DefaultConversionService.<init>(DefaultConversionService.java:54)
at org.springframework.core.env.AbstractPropertyResolver.<init>(AbstractPropertyResolver.java:41)
at org.springframework.core.env.PropertySourcesPropertyResolver.<init>(PropertySourcesPropertyResolver.java:41)
at org.springframework.core.env.AbstractEnvironment.<init>(AbstractEnvironment.java:112)
at org.springframework.core.env.StandardEnvironment.<init>(StandardEnvironment.java:54)
at org.springframework.web.context.support.StandardServletEnvironment.<init>(StandardServletEnvironment.java:44)
at org.springframework.web.servlet.HttpServletBean.createEnvironment(HttpServletBean.java:215)
at org.springframework.web.servlet.HttpServletBean.getEnvironment(HttpServletBean.java:205)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5327)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5617)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
三月 13, 2016 3:12:02 下午 org.apache.catalina.core.StandardContext loadOnStartup
严重: Servlet [springMVC] in web application [/SpringmvcTest] threw load() exception
java.lang.NullPointerException
at org.springframework.core.SerializableTypeWrapper$TypeProxyInvocationHandler.invoke(SerializableTypeWrapper.java:239)
at org.springframework.core.$Proxy4.hashCode(Unknown Source)
at org.springframework.util.ObjectUtils.nullSafeHashCode(ObjectUtils.java:273)
at org.springframework.core.ResolvableType.hashCode(ResolvableType.java:811)
at org.springframework.util.ConcurrentReferenceHashMap.getHash(ConcurrentReferenceHashMap.java:214)
at org.springframework.util.ConcurrentReferenceHashMap.getReference(ConcurrentReferenceHashMap.java:246)
at org.springframework.util.ConcurrentReferenceHashMap.get(ConcurrentReferenceHashMap.java:226)
at org.springframework.core.ResolvableType.forType(ResolvableType.java:1198)
at org.springframework.core.ResolvableType.forType(ResolvableType.java:1177)
at org.springframework.core.ResolvableType.forTypes(ResolvableType.java:856)
at org.springframework.core.ResolvableType.getInterfaces(ResolvableType.java:403)
at org.springframework.core.ResolvableType.as(ResolvableType.java:365)
at org.springframework.core.convert.support.GenericConversionService.getRequiredTypeInfo(GenericConversionService.java:286)
at org.springframework.core.convert.support.GenericConversionService.addConverterFactory(GenericConversionService.java:118)
at org.springframework.core.convert.support.DefaultConversionService.addScalarConverters(DefaultConversionService.java:86)
at org.springframework.core.convert.support.DefaultConversionService.addDefaultConverters(DefaultConversionService.java:67)
at org.springframework.core.convert.support.DefaultConversionService.<init>(DefaultConversionService.java:54)
at org.springframework.core.env.AbstractPropertyResolver.<init>(AbstractPropertyResolver.java:41)
at org.springframework.core.env.PropertySourcesPropertyResolver.<init>(PropertySourcesPropertyResolver.java:41)
at org.springframework.core.env.AbstractEnvironment.<init>(AbstractEnvironment.java:112)
at org.springframework.core.env.StandardEnvironment.<init>(StandardEnvironment.java:54)
at org.springframework.web.context.support.StandardServletEnvironment.<init>(StandardServletEnvironment.java:44)
at org.springframework.web.servlet.HttpServletBean.createEnvironment(HttpServletBean.java:215)
at org.springframework.web.servlet.HttpServletBean.getEnvironment(HttpServletBean.java:205)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5327)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5617)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)