eclipse 安装了基于 APR 的 Apache Tomcat Native 库的不兼容版本 1.1.12,而 Tomcat 需要版本 1.1.17
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4792047/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
An incompatible version 1.1.12 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.17
提问by krishna
I downloaded Apache Tomcat 7.x. When I add this Tomcat in Eclipse I get this error:
我下载了 Apache Tomcat 7.x。当我在 Eclipse 中添加此 Tomcat 时,出现此错误:
Jan 25, 2011 3:21:05 PM org.apache.catalina.core.AprLifecycleListener init
SEVERE: An incompatible version 1.1.12 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.17
Jan 25, 2011 3:21:05 PM org.apache.catalina.core.AprLifecycleListener init
SEVERE: An incompatible version 1.1.12 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.17
Jan 25, 2011 3:21:05 PM org.apache.catalina.core.AprLifecycleListener init
SEVERE: An incompatible version 1.1.12 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.17
Jan 25, 2011 3:21:05 PM org.apache.catalina.core.AprLifecycleListener init
SEVERE: An incompatible version 1.1.12 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.17
Jan 25, 2011 3:21:05 PM org.apache.catalina.core.AprLifecycleListener init
SEVERE: An incompatible version 1.1.12 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.17
Jan 25, 2011 3:21:08 PM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jan 25, 2011 3:21:08 PM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jan 25, 2011 3:21:08 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3054 ms
Jan 25, 2011 3:21:08 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jan 25, 2011 3:21:08 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.6
Jan 25, 2011 3:21:08 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jan 25, 2011 3:21:08 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jan 25, 2011 3:21:08 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 251 ms
How can I solve this problem?
我怎么解决这个问题?
When I open the localhost:8080/manager/html
it shows the following error:
当我打开localhost:8080/manager/html
它时,它显示以下错误:
HTTP Status 404 - /manager/html
type Status report
message /manager/html
description The requested resource (/manager/html) is not available.
Apache Tomcat/7.0.6
回答by Pace
The first error certainly sounds like a version mismatch. The APR library is a library linked in at runtime based on your path (which itself can be based on where you execute Tomcat from). It sounds like you have the APR library for Tomcat 6. It's possible that Eclipse is providing this APR library.
第一个错误听起来肯定是版本不匹配。APR 库是在运行时根据您的路径(它本身可以基于您执行 Tomcat 的位置)链接的库。听起来您有 Tomcat 6 的 APR 库。Eclipse 可能提供了这个 APR 库。
Tomcat ships with an APR library but in order to ease installation Tomcat doesn't automatically modify the path to point at the APR library. The Eclipse Tomcat integration may (I'm not sure on this one, haven't used the integration before) include the APR libraries to make it easier to use Tomcat.
Tomcat 附带一个 APR 库,但为了简化安装,Tomcat 不会自动修改指向 APR 库的路径。Eclipse Tomcat 集成可能(我不确定这一点,之前没有使用过集成)包括 APR 库,以便更轻松地使用 Tomcat。
Check and make sure that Eclipse isn't configured to use an earlier version of Tomcat and if it is, either upgrade Eclipse to Tomcat 7 or downgrade Tomcat to the version specified in Eclipse.
检查并确保 Eclipse 未配置为使用早期版本的 Tomcat,如果是,请将 Eclipse 升级到 Tomcat 7 或将 Tomcat 降级到 Eclipse 中指定的版本。
If you can't figure it out then you don't necessarily have to worry about it at the moment. Tomcat should work anyways without the APR libraries. The only benefit you will get from the APR libraries is increased performance and since this is probably the start of your project that doesn't have to be worked out right away.
如果您无法弄清楚,那么您目前不必担心。Tomcat 应该可以在没有 APR 库的情况下工作。您从 APR 库中获得的唯一好处是提高了性能,因为这可能是您项目的开始,不必立即解决。
The second issue, the /manager/ page, could be Tomcat configuration. Tomcat won't actually display the manager page (and it will give you that error) unless users have been configured with manager permissions.
第二个问题,/manager/ 页面,可能是Tomcat 配置。Tomcat 实际上不会显示管理器页面(它会给你那个错误),除非用户已经配置了管理器权限。
Try going to just / (i.e. http://localhost:8080), that page should load regardless of user configuration.
尝试只访问 /(即http://localhost:8080),无论用户配置如何,该页面都应该加载。
回答by bentolor
In my case I had inadvertently installed the APR library when I install once Tomcat locally on my Linux using the package manager. On Debian/Ubuntu this installed the APR package for a different Tomcat version (the one bundled with your distribution) which caused this error.
在我的情况下,当我使用包管理器在我的 Linux 上本地安装一次 Tomcat 时,我无意中安装了 APR 库。在 Debian/Ubuntu 上,这为导致此错误的不同 Tomcat 版本(与您的发行版捆绑在一起的版本)安装了 APR 包。
After simply
简单地之后
sudo apt-get purge libtcnative-1
The error was gone.
错误消失了。