404启动tomcat服务器和Tomcat Native Library在java库路径上找不到

时间:2012-11-30 16:15:05

标签: sql-server apache tomcat http-status-code-404

所以我在win 32位环境中在Eclipse中启动了一个Tomcat webserver。我指向404时找不到localhost:8080/HippoWebApp网络应用程序。该页面有一些信息:

The requested resource (/HippoWebApp/) is not available.

Eclipse控制台说:

Nov 30, 2012 10:56:49 AM org.apache.catalina.core.AprLifecycleListener init

INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Java\jdk1.6.0_26-32\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32

我做错了什么?我读了APR,好像是harmless warning

.settings/org.eclipse.wst.common.component

中设置上下文路径的文件
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
    <wb-module deploy-name="HippoWebApp">
        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
        <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
        <wb-resource deploy-path="/" source-path="/target/CalmsWebContent-war"/>
        <dependent-module archiveName="VwCNConfigs-7.3.16.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/VwCNConfigs/VwCNConfigs">
            <dependency-type>uses</dependency-type>
        </dependent-module>
        <dependent-module archiveName="VwCNAPI-7.3.16.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/VwCNAPI/VwCNAPI">
            <dependency-type>uses</dependency-type>
        </dependent-module>
        <dependent-module archiveName="VwCNAjaxServices-7.3.16.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/VwCNAjaxServices/VwCNAjaxServices">
            <dependency-type>uses</dependency-type>
        </dependent-module>
        <dependent-module archiveName="VwCNServices-7.3.16.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/VwCNServices/VwCNServices">
            <dependency-type>uses</dependency-type>
        </dependent-module>
        <dependent-module archiveName="VwCNCRAReportService-7.3.16.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/VwCNCRAReportService/VwCNCRAReportService">
            <dependency-type>uses</dependency-type>
        </dependent-module>
        <dependent-module archiveName="Web2VwCN-7.3.16.war" deploy-path="/WEB-INF/lib" handle="module:/resource/Web2VwCN/Web2VwCN">
            <dependency-type>uses</dependency-type>
        </dependent-module>
        <property name="context-root" value="HippoWebApp"/>
        <property name="java-output-path" value="/HippoWebApp/target/classes"/>
    </wb-module>
</project-modules>

启动服务器时记录:

Nov 30, 2012 10:56:49 AM org.apache.catalina.core.AprLifecycleListener init    INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Java\jdk1.6.0_26-32\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\jrockit_150_12\bin;C:\Java\jdk1.6.0_26-32\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\CA\SharedComponents\ScanEngine;C:\Program Files\CA\SharedComponents\CAUpdate\;C:\Program Files\CA\SharedComponents\ThirdParty\;C:\Program Files\CA\SharedComponents\SubscriptionLicense\;C:\Program Files\CA\eTrustITM;C:\Program Files\TortoiseSVN\bin;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Perforce;C:\Program Files\Belgium Identity Card;C:\WINDOWS\system32\WindowsPowerShell\v1.0;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Java\jdk1.6.0_26-23\bin;C:\maven\bin;C:\maven\bin;.    
    Nov 30, 2012 10:56:50 AM org.apache.coyote.http11.Http11Protocol init    
    INFO: Initializing Coyote HTTP/1.1 on http-8080    
    Nov 30, 2012 10:56:50 AM org.apache.catalina.startup.Catalina load    
    INFO: Initialization processed in 794 ms    
    Nov 30, 2012 10:56:50 AM org.apache.catalina.core.StandardService start    
    INFO: Starting service Catalina    
    Nov 30, 2012 10:56:50 AM org.apache.catalina.core.StandardEngine start    
    INFO: Starting Servlet Engine: Apache Tomcat/6.0.33    
    Nov 30, 2012 10:56:50 AM org.apache.coyote.http11.Http11Protocol start    
    INFO: Starting Coyote HTTP/1.1 on http-8080    
    Nov 30, 2012 10:56:50 AM org.apache.jk.common.ChannelSocket init    
    INFO: JK: ajp13 listening on /0.0.0.0:8009    
    Nov 30, 2012 10:56:50 AM org.apache.jk.server.JkMain start    
    INFO: Jk running ID=0 time=0/31  config=null    
    Nov 30, 2012 10:56:50 AM org.apache.catalina.startup.Catalina start    
    INFO: Server startup in 409 ms

1 个答案:

答案 0 :(得分:0)

APR警告不是HTTP 404的原因。 你可以发布整个Tomcat启动日志吗?应用程序是否正确启动?您是否设置了上下文路径?

如果我没弄错的话,在org.eclipse.wst.common.component文件夹的文件.settings中设置了上下文路径。