| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2709 人关注过本帖
标题:springmvc配置错误,很像找不到springmvc的servlet
只看楼主 加入收藏
北方孤狼
Rank: 1
等 级:新手上路
帖 子:41
专家分:0
注 册:2008-5-10
结帖率:75%
收藏
 问题点数:0 回复次数:3 
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)
搜索更多相关主题的帖子: version 
2016-03-13 18:41
hhwz
Rank: 13Rank: 13Rank: 13Rank: 13
等 级:贵宾
威 望:87
帖 子:687
专家分:4502
注 册:2011-5-22
收藏
得分:0 
看看包是否导入
2016-03-14 17:16
北方孤狼
Rank: 1
等 级:新手上路
帖 子:41
专家分:0
注 册:2008-5-10
收藏
得分:0 
回复 2楼 hhwz
commons-logging-1.2
spring-2.5.4
spring-aop-4.1.0.RELEASE
spring-aspects-4.1.0.RELEASE
spring-beans-4.1.0.RELEASE
spring-context-4.1.0.RELEASE
spring-context-support-4.1.0.RELEASE
spring-core-4.1.0.RELEASE
spring-expression-4.1.0.RELEASE
spring-instrument-4.1.0.RELEASE
spring-instrument-tomcat-4.1.0.RELEASE
spring-jdbc-4.1.0.RELEASE
spring-jms-4.1.0.RELEASE
spring-messaging-4.1.0.RELEASE
spring-orm-4.1.0.RELEASE
spring-oxm-4.1.0.RELEASE
spring-test-4.1.0.RELEASE
spring-tx-4.1.0.RELEASE
spring-web-4.1.0.RELEASE
spring-webmvc-4.1.0.RELEASE
spring-webmvc-portlet-4.1.0.RELEASE
spring-websocket-4.1.0.RELEASE
2016-03-14 23:56
hhwz
Rank: 13Rank: 13Rank: 13Rank: 13
等 级:贵宾
威 望:87
帖 子:687
专家分:4502
注 册:2011-5-22
收藏
得分:0 
spring-2.5.4 去掉这个包看看
2016-03-15 09:42
快速回复:springmvc配置错误,很像找不到springmvc的servlet
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.105060 second(s), 10 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved