java web 项目名更改 illegalargument_myeclipse 修改项目名Tomcat启动项目报错java.lang.IllegalArgumentException: Can't ...

一、Tomcat启动报错:

有时候我们会避免项目重名,在导入项目时会修改项目名称。

修改项目名称后启动该项目至tomcat,报错:java.lang.IllegalArgumentException: Can't convert argument: null

二、问题分析:

因为MyEclipse在修改项目名时候,自动更新部署了web.xml文件并且重新生成了xml文件的头部声明. 会将标签修改为 这样的类型。

三、解决问题:

修改项目的web.xml,将其中带有javaee:的标签中的javaee:删掉即可,也可以直接Ctrl+F将javaee:直接全部替换为空。

四、报错信息如下:

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

at org.apache.tomcat.util.IntrospectionUtils.convert(IntrospectionUtils.java:999)

at org.apache.tomcat.util.digester.CallMethodRule.end(CallMethodRule.java:523)

at org.apache.tomcat.util.digester.Rule.end(Rule.java:229)

at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1140)

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$FragmentContentDispatcher.dispatch(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 org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644)

at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:365)

at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1066)

at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)

at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627)

at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)

at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)

at org.apache.catalina.core.StandardService.start(StandardService.java:516)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

at org.apache.catalina.startup.Catalina.start(Catalina.java:578)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

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

MessageBrokerServlet

MessageBrokerServlet

flex.messaging.MessageBrokerServlet

services.configuration.file

/WEB-INF/flex/services-config.xml

1

将标签 中的javaee:删掉就完美解决问题,直接Ctrl+F将javaee:直接全部替换为空。

---------------------

本文来自 Lemyou 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/Lemyou/article/details/80373024?utm_source=copy

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值