Eclipse中工程重命名后,启动tomcat,出现异常:

Sep 8, 2011 1:41:52 PM org.apache.catalina.startup.ContextConfig parseWebXml
SEVERE: Parse error in application web.xml file at jndi:/localhost/gzpetro-portal/WEB-INF/web.xml
java.lang.IllegalArgumentException: Can't convert argument: null
 at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2687)
 at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2713)
 at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1060)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
 at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
 at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
 at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1543)

上述问题,是由于在Eclipse下重构JEE项目名时,Eclipse自动更新了部署文件web.xml,重新生成了xml文件的头部声明,新增加了javaee的命名空间。

<init-param>  
      <javaee:param-name>debug</javaee:param-name>  
      <javaee:param-value>true</javaee:param-value>  
    </init-param>

将前面的javaee:去掉即可。