Caused by: java.lang.IllegalArgumentException

J2EE 码拜 10年前 (2015-04-05) 1994次浏览 0个评论

十二月 07, 2014 6:28:12 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property “”source”” to “”org.eclipse.jst.jee.server:Hi”” did not find a matching property.
十二月 07, 2014 6:28:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version:        Apache Tomcat/7.0.57
十二月 07, 2014 6:28:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built:          Nov 3 2014 08:39:16 UTC
十二月 07, 2014 6:28:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:         7.0.57.0
十二月 07, 2014 6:28:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 7
十二月 07, 2014 6:28:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:            6.1
十二月 07, 2014 6:28:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture:          amd64
十二月 07, 2014 6:28:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JAVA_HOME:             E:\Program Files\Java\jdk1.7.0_67\jre
十二月 07, 2014 6:28:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:           1.7.0_67-b01
十二月 07, 2014 6:28:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor:            Oracle Corporation
十二月 07, 2014 6:28:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         F:\Users\Administrator\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
十二月 07, 2014 6:28:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         E:\apache-tomcat-7.0.57
十二月 07, 2014 6:28:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=F:\Users\Administrator\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
十二月 07, 2014 6:28:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=E:\apache-tomcat-7.0.57
十二月 07, 2014 6:28:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=F:\Users\Administrator\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
十二月 07, 2014 6:28:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=E:\apache-tomcat-7.0.57\endorsed
十二月 07, 2014 6:28:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=GBK
十二月 07, 2014 6:28:12 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: E:\Program Files\Java\jdk1.7.0_67\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;E:/Program Files/java/jdk1.7.0_67/bin/../jre/bin/server;E:/Program Files/java/jdk1.7.0_67/bin/../jre/bin;E:/Program Files/java/jdk1.7.0_67/bin/../jre/lib/amd64;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;D:\Program Files\MySQL\MySQL Utilities 1.3.6\;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;E:\Program Files\java\jdk1.7.0_67\bin;E:\eclipse-jee-luna-SR1-win32-x86_64(1)\eclipse;;.
十二月 07, 2014 6:28:12 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler [“http-bio-8080”]
十二月 07, 2014 6:28:12 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler [“ajp-bio-8009”]
十二月 07, 2014 6:28:12 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1949 ms
十二月 07, 2014 6:28:12 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
十二月 07, 2014 6:28:12 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.57
十二月 07, 2014 6:28:13 下午 org.apache.catalina.util.SessionIdGenerator createSecureRandom
信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [168] milliseconds.
十二月 07, 2014 6:28:13 下午 org.apache.catalina.core.ContainerBase startInternal
严重: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Hi]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Hi]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
… 6 more
Caused by: java.lang.IllegalArgumentException: The servlets named [HiServlet] and [ch14.HiServlet] are both mapped to the url-pattern [/HiServlet] which is not permitted
at org.apache.catalina.deploy.WebXml.addServletMapping(WebXml.java:293)
at org.apache.catalina.startup.ContextConfig.processAnnotationWebServlet(ContextConfig.java:2410)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2085)
at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2046)
at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2039)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1304)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:889)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5380)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
… 6 more

十二月 07, 2014 6:28:13 下午 org.apache.catalina.core.ContainerBase startInternal
严重: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:739)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.startup.Catalina.start(Catalina.java:689)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)

Caused by: java.lang.IllegalArgumentException
30分
Caused by: java.lang.IllegalArgumentException: The servlets named [HiServlet] and [ch14.HiServlet] are both mapped to the url-pattern [/HiServlet] which is not permitted

原因就是这句话啊!说的很清楚了!HiServlet 和ch14.HiServlet这两个Servelt都映射到/HiServlet这个url-pattern这个不允许!因为当你访问url-pattern为/HiServlet时对应两个Servelt服务器就不知道要选择执行那个!该其中一个Servlet的映射路径!

Caused by: java.lang.IllegalArgumentException
10分
which is not permitted
Caused by: java.lang.IllegalArgumentException
谢谢解答,已经解决了

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明Caused by: java.lang.IllegalArgumentException
喜欢 (0)
[1034331897@qq.com]
分享 (0)

文章评论已关闭!