`
- 浏览:
112770 次
- 性别:
- 来自:
上海
-
tomcat org.apache.catalina.LifecycleException 和APR错误信息解决
一直在写c/s开发的东西,从没有尝试写web方面的工程,闲暇时写了一个,参照视频教程。
我的环境:windows xp x86 32bit
tomcat 7.0
jre/jdk 1.6
很快参照视频新建立了一个web工程,可是运行的时候出现如下错误:
2012-8-5 11:43:43 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:/Program Files/Java/jre6/lib/i386;D:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Java\jdk1.6.0_10\bin;C:\abc;C:\Documents and Settings\Administrator\Application Data\npm;C:\Program Files\nodejs\;C:\Program Files\TortoiseSVN\bin;F:\tool\maven\apache-maven-3.0.4\bin;E:\eclipse;
2012-8-5 11:43:43 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:pushletTest' did not find a matching property.
2012-8-5 11:43:43 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8080"]
2012-8-5 11:43:43 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-bio-8009"]
2012-8-5 11:43:43 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 390 ms
2012-8-5 11:43:43 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
2012-8-5 11:43:43 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.27
2012-8-5 11:43:44 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[/pushletTest]]
at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1128)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:782)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/pushletTest]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 7 more
Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> login in servlet mapping
at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3208)
at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3183)
at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1302)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1294)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:855)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:345)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more
2012-8-5 11:43:44 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$Sync.innerGet(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1128)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
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:732)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.startup.Catalina.start(Catalina.java:675)
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:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
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:1566)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1136)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:782)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more
2012-8-5 11:43:44 org.apache.catalina.startup.Catalina start
严重: Catalina.start:
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.startup.Catalina.start(Catalina.java:675)
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:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1136)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more
2012-8-5 11:43:44 org.apache.catalina.startup.Catalina start
信息: Server startup in 257 ms
这个很是让人头痛,先解决APR的问题(其实这个问题不用去管)
到这个网站上ihttp://tomcat.apache.org/download-native.cg下载tomcat-native-1.1.24-ocsp-win32-bin,解压 ,把tcnative-1.dll这个文件放到java.library.path下的任何一个目录都可以。
这样就解决了ARP问题。
对于下面的异常信息,通过百度和GOOGLE,众说纷纭,有的说是JDK和TOMCAT版本不一致的问题,有的说是servlet-api.JAR包的问题,我差一点就重新下载安装JDK和TOMCAT,不过后来随意改掉了<servlet-mapping>中的<url-pattern>(在最前面加了一个"/"),结果问题解决了~
反思:视频教程中<url-pattern>写的时候前面是没有加“/”,当时其环境是:
windows xp x86
jdk 1.5
tomcat 5.5
估计是版本不一致的问题,唉~也估计就新手能遇到这样的问题。
分享到:
Global site tag (gtag.js) - Google Analytics
相关推荐
问题1:TOMCAT下载文件出错:org.apache.catalina.connector.ClientAbortException. 问题2:TOMCAT记录接收数据大小、发送数据大小和请求处理时间
org.apache.catalina.core.AprLifecycleListener myeclipse tomcat 無法啟動 用這個文件
2010-8-11 18:24:13 org.apache.catalina.core.AprLifecycleListener lifecycleEvent 信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the ...
apache-tomcat-8.5.78 源码 maven 版本,配置都已经搞定,开箱即用。是学习tomcat的不二之选。启动类 org.apache.catalina.startup.Bootstrap
在Java Web应用开发中,Tomcat作为常用的Servlet容器,其默认的日志系统是通过`catalina.out`文件记录所有标准输出和错误输出。当应用运行一段时间后,`catalina.out`文件可能会变得非常大,占用大量磁盘空间,这...
很详细的apache-tomcat-8.0.523月 17, 2019 10:51:41 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin 警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' ...
jar包,官方版本,自测可用
在Java Web开发中,Tomcat是一个广泛使用的应用服务器,它默认使用`catalina.out`文件来记录所有标准输出和错误输出。然而,对于大型应用或长时间运行的服务器,`catalina.out`可能会变得非常大,不利于日志管理和...
<filter-class>org.apache.catalina.filters.HttpHeaderSecurityFilter <async-supported>true <param-name>antiClickJackingEnabled <param-value>true <param-name>antiClickJackingOption ...
Apache Tomcat 是一款广泛应用的开源软件,主要用于部署和运行Java Servlet和JavaServer Pages(JSP)应用程序。在本文中,我们将深入探讨Apache Tomcat 8.5.100这一特定版本的重要特性、安装与配置过程,以及如何...
Apache Tomcat 8.5.100 是一个流行的开源Java Servlet容器,它实现了Java EE Web应用程序规范,尤其是Servlet和JSP。Tomcat是许多Web开发者首选的服务器,因为它轻量级、高效且易于配置。在本文中,我们将深入探讨...
在解压后的目录中,`bin` 目录包含了启动和停止Tomcat的脚本,如 `catalina.sh`(在Linux环境下)和 `startup.bat`(在Windows环境下)。`conf` 目录则包含了一系列配置文件,如 `server.xml`(定义服务器的全局配置...
apache-tomcat软件,windows-64版本 日志可查看catalina.out,如下: at org.springframework.web.servlet.mvc.method.annotation... at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
- 在进行任何修改之前,请先备份`startup.bat`和`catalina.bat`文件,以免后续操作出现错误时无法恢复。 #### 三、具体步骤 接下来,我们将逐步介绍如何对`startup.bat`和`catalina.bat`两个脚本文件进行修改,以...
`catalina.out`是Tomcat默认的日志文件,它记录了Tomcat启动、运行以及错误信息,对开发者和管理员来说非常重要。然而,如果不进行适当管理,这个日志文件可能会无限制增长,占用大量磁盘空间,甚至可能导致服务器...
通过以上步骤,Tomcat服务器将使用Log4j来管理catalina.out日志,这不但解决了日志文件过大和格式不统一的问题,而且提供了更丰富的日志管理功能,例如,可以利用Log4j强大的过滤、路由和格式化等功能,将日志管理得...
Apache Tomcat 是一款开源的Java Servlet容器,常用于部署Java Web应用程序。在Linux环境中,它作为Java Enterprise Edition(Java EE)的一部分,为开发者提供了一个轻量级的服务器平台。"apache-tomcat-8.5.64.tar...
另外,可以通过调整`catalina.sh`或`catalina.bat`中的JVM参数来优化内存分配和垃圾回收,以适应你的特定需求。 9. **部署应用**:将`.war`文件复制到`$CATALINA_HOME/webapps`目录下,Tomcat会自动解压并启动应用...
Apache Tomcat 7.0.100 是一个流行的开源软件,用作Java Servlet和JavaServer Pages(JSP)的容器,以及Java EE Web应用程序的标准实现。它由Apache软件基金会维护,是Apache Jakarta项目的一部分。这个版本适用于...
5. **日志管理**:Tomcat的日志信息存储在`logs`目录下,包括`catalina.out`、`host-manager`和`manager`等文件。可以通过配置`logging.properties`文件来定制日志输出。 6. **安全管理**:Tomcat提供了基于角色的...