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

标签: Java Web Tomcat
4217人阅读 评论(1) 收藏 举报
分类:

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>

查看评论

零基础学习ArcGis for Android 视频课程

全们学习移动端GIS开发
  • 2016年08月19日 09:50

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...
  • bunny1024
  • bunny1024
  • 2016-12-15 14:40:33
  • 8165

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

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

使用Activity.isfinishing()解决java.lang.IllegalArgumentException: View not attached to window manager

在页面中使用了dialog、popwindow等弹框控件的时候,有时候会报java.lang.IllegalArgumentException: View not attached to window...
  • u012264122
  • u012264122
  • 2016-07-23 09:47:37
  • 2672

错误LinearLayoutManager is already attached to a RecyclerView

错误LinearLayoutManager is already attached to a RecyclerView
  • hzypf
  • hzypf
  • 2017-06-26 15:49:57
  • 831

java.lang.IllegalArgumentException: View not attached to window manager when dismissing dialog

Exception One, java.lang.IllegalArgumentException: View not attached to window manager at android....
  • zirconsdu
  • zirconsdu
  • 2013-04-03 13:50:58
  • 5774

android点击事件分发机制总结

Android点击事件分发机制可分为两大类: View的点击事件处理ViewGroup的点击事件处理 先从基本的View的点击事件处理开始: 当我们点击一个View的时候,先后触发的事件次序为: ...
  • bunny1024
  • bunny1024
  • 2017-06-08 12:49:54
  • 508

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

tomcat项目配置信息中的名字重复了
  • ying83811
  • ying83811
  • 2013-08-07 11:32:58
  • 1703

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

1、错误描述 [plain] view plaincopy 严重: End event threw exception   java.lang.r...
  • scholar_man
  • scholar_man
  • 2015-09-22 17:10:37
  • 2977

错误:java.lang.IllegalArgumentException:No view found for id for fragment 的解决

出现这个错误的时候,立刻就开始百度,谷歌,看了各种解答,都没有解决我的问题,最后才发现问题出在传的参数不对,一个小问题浪费了我很长时间,以后要注意,不要每次遇到问题就立刻搜索。首先,自己给自己一些时间...
  • mengliluohua_151
  • mengliluohua_151
  • 2013-06-03 12:37:15
  • 33929
    个人资料
    专栏达人 持之以恒
    等级:
    访问量: 603万+
    积分: 7万+
    排名: 25
    新浪博客
    博客专栏
    FusionCharts

    文章:14篇

    阅读:72258
    Flex

    文章:13篇

    阅读:29794
    dojo

    文章:10篇

    阅读:31044
    Linux

    文章:47篇

    阅读:69007
    最新评论