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

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>

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

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

时间: 2024-12-09 08:40:22

Caused by: java.lang.IllegalArgumentException: addChild: Child name 'localhost' is not unique的相关文章

java.lang.IllegalArgumentException: addChild: Child name &#39;/SSHE&#39; is not unique

错误信息: Caused by: java.lang.IllegalArgumentException: addChild:  Child name '/SSHE' is not unique    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:887)    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase

Caused by java lang IllegalArgumentException addChild Chi

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

android Caused by: java.lang.IllegalArgumentException: Binary XML file line #7: Must specify unique

今天写了一个静态得fragment,好久没写了,一写就出现问题了,先看下布局文件 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height=&qu

Caused by: java.lang.IllegalArgumentException: error at ::0 can&#39;t find referenced pointcut aaa

这个错误是说,找不到这个注释: 解决方案: 1.更改自己本机的jdk版本(我的更改了无效): 在工程选择框内点击右键--->build path----->Library--->add Library 选择JRE System Library ----->next 就可以更改了. 2.更改aspectjweaver.ja的版本,进入官网这一页http://www.eclipse.org/aspectj/downloads.php 选择aspectj-1.8.8.jar进行下载. 完

Spring与JDK版本不一致引发问题Caused by: java.lang.IllegalArgumentException

tomcat启动一个spring的项目,tomcat使用8.5,JDK使用1.8,Spring使用3.0,启动之后报错 Caused by: java.lang.IllegalArgumentException at org.springframework.asm.ClassReader.<init>(Unknown Source) at org.springframework.asm.ClassReader.<init>(Unknown Source) at org.spring

解决kylin报错:Failed to create dictionary on &lt;db&gt;.&lt;table&gt;, Caused by: java.lang.IllegalArgumentException: Too high cardinality is not suitable for dictionary

报错信息: 2017-05-13 15:14:30,035 DEBUG [pool-9-thread-10] dict.DictionaryGenerator:94 : Dictionary class: org.apache.kylin.dict.TrieDictionary 2017-05-13 15:14:30,036 ERROR [pool-9-thread-10] common.HadoopShellExecutable:65 : error execute HadoopShellEx

Android广播接收器注册问题:Caused by: java.lang.IllegalArgumentException: Receiver not registered

1.程序中明明使用如下方法进行了广播的注册和解除注册: mContext.registerReceiver(downloadReceiver, filter); mContext.unregisterReceiver(downloadReceiver); 但程序运行过程中还是有一下问题: android.app.IntentReceiverLeaked: Activity *********** has leaked IntentReceiver *********** that was ori

解决Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for com.geek.dao.ContentDao.Integer

mybatis报错:Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for com.geek.dao.ContentDao.Integer 出错原因:一个手误 <select id="selectAllFirstNavigationName" resultMap="firstNavigation"> SELECT fi

Android Caused by: java.lang.IllegalArgumentException: column &#39;_id&#39; does not exist

出错原因:在查询整个sqlite数据库时,没有查询到 "_id" 这一列. 原来的代码是:mSQLiteDatabase.query(table_name, new String[] {_title}, null, null, null, null, null); 修改后的代码为:mSQLiteDatabase.query(table_name, null, null, null, null, null, null); 这里的 new String[] {MyEvent._title}