Caused by: java.lang.IllegalArgumentException: addChild: Child name 'localhost' is not unique

原创 2015年09月08日 17:02:55

1、错误描述

严重: End event threw exception
java.lang.reflect.InvocationTargetException
	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.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:852)
	at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:201)
	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:1555)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:615)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:663)
	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.load(Bootstrap.java:280)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:454)
Caused by: java.lang.IllegalArgumentException: addChild:  Child name 'localhost' is not unique
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:887)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardEngine.addChild(StandardEngine.java:244)
	... 26 more

2、错误原因

     由于在Tomcat中的server.xml中加了一个:

<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true"></Host>
    而自身本来自带一个:

<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true"></Host>

     有两个Host导致重复


3、解决办法

    去掉添加的一个Host

<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true"></Host>

版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

RecycleView报错Java.lang.IllegalArgumentException: Called attach on a child which is not detached

RecycleView报错Java.lang.IllegalArgumentException: Called attach on a child which is not detached item...

关于java.lang.IllegalArgumentException: View not attached to window manager 错误的分析

今天遇到一个很奇特的问题,当用户设置了PIN码,在锁屏界面正常解锁PIN码后,进入Launcher时显示com.android.phone 已停止运行。一开始猜想会不会是解锁PIN码的时候处理导致了P...

java.lang.IllegalArgumentException: Scrapped or attached views may not be recycled. isScrap:false is

在尝试使用LayoutTransition自定义RecyclerView的添加或者移除item的动画时,出现了此Bug.在stackoverflow找到了解决方案,在此记录备案。先还原下问题, Rec...

Caused by: java.lang.IllegalArgumentException: addChild: Child name 'localhost' is not unique

1、错误描述 [plain] view plaincopy 严重: End event threw exception   java.lang.r...

java.lang.IllegalArgumentException介绍

相信这个异常大家都很常见。 我现在遇到一个需要配置tomcat  server.xml来修正的找不到的问题: 如下: java.lang.IllegalArgumentException: ...

addChild: Child name 'ssi' is not unique 网站不能访问

tomcat项目配置信息中的名字重复了

Caused by: java.lang.IllegalArgumentException: Javassist library is missing in classpath! ..错误解决

Caused by: java.lang.IllegalArgumentException: Javassist library is missing in classpath! ..错误解决 ...

Caused by: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value

整合spring+mybatis 报错以下错误:我完全是IDEA的问题!!!找了半天啊!!!org.apache.ibatis.binding.BindingException: Invalid bo...

Spring+Mybatis整合时Caused by: java.lang.IllegalArgumentException错误

Caused by: java.lang.IllegalArgumentException 详细错误信息: org.springframework.beans.factory.BeanDefiniti...
  • fpxty
  • fpxty
  • 2017年05月24日 11:52
  • 1502

Caused by: java.lang.IllegalArgumentException: argument type mismatch错误

2014-06-24 08:51:42,984 ERROR [main] (DefSchedulerEngine.java:157) - 调度引擎启动异常 org.springframework.o...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Caused by: java.lang.IllegalArgumentException: addChild: Child name 'localhost' is not unique
举报原因:
原因补充:

(最多只允许输入30个字)