java.lang.IllegalArgumentException: Can't convert argument: null

在最近开发中,项目部署完启动的时候,后台报java.lang.IllegalArgumentException: Can't convert argument: null

根据报的错误是web.xml文件参数不能转换。
再看web.xml文件里面多了好多

<context-param>   
<javaee:param-name>contextConfigLocation</javaee:param-name>   
<javaee:param-value>classpath:beanRefFactory.xml</javaee:param-value>   
</context-param>   
<context-param>   
<javaee:param-name>ssoCurrentApp</javaee:param-name>   
<javaee:param-value>hollycrm</javaee:param-value>   
</context-param> 




  之类的配置信息,这是由于eclipse在修改项目名的时候,eclipse自动更新部署了web.xml文件 并且重新生成了xml文件的头部声明. 新增了java的命名把这个javaee去掉就可以了.一般情况下他会修改servlet的配置。
  修改项目后之后的web.xml仔细观察<init-param>标签下的子标签是否多了一个javaee你把这个删除掉就可以了。

<filter>  
    <filter-name>CharacterEncoding</filter-name>  
    <filter-class>com.avonaco.test.filter.CharacterEncoding</filter-class>  
    <init-param>  
      <javaee:param-name>encoding</javaee:param-name>  
      <javaee:param-value>utf-8</javaee:param-value>  
    </init-param>  
  </filter> 


或是恢复之前的web.xml文件即可。

猜你喜欢

转载自yangtaohong.iteye.com/blog/1988394