web项目Windows上正常访问,linux下404

落落狂生 发布于 2017/03/15 13:48
阅读 1K+
收藏 0

web项目Windows上正常访问,linux下404。

项目是部署在tomcat的webapps下面的。

下面是log的信息

2017-3-15 13:20:35 org.apache.coyote.http11.Http11Protocol pause
信息: Pausing Coyote HTTP/1.1 on http-28080
2017-3-15 13:20:36 org.apache.catalina.core.StandardService stop
信息: Stopping service Catalina
2017-3-15 13:20:36 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/innoplay-dev] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2017-3-15 13:20:36 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/innoplay-dev] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
2017-3-15 13:20:36 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/musicStar] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2017-3-15 13:20:36 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/musicStar] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2017-3-15 13:20:36 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/musicStar] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
2017-3-15 13:20:36 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/hami] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2017-3-15 13:20:36 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/hami] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak.
2017-3-15 13:20:36 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/hami] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak.
2017-3-15 13:20:37 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/SmartHardware] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2017-3-15 13:20:37 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/SmartHardware] appears to have started a thread named [Timer-1] but has failed to stop it. This is very likely to create a memory leak.
2017-3-15 13:20:37 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/SmartHardware] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak.
2017-3-15 13:20:37 org.apache.coyote.http11.Http11Protocol destroy
信息: Stopping Coyote HTTP/1.1 on http-28080
2017-3-15 13:20:38 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: /usr/java/jdk1.6.0_27/jre/lib/amd64/server:/usr/java/jdk1.6.0_27/jre/lib/amd64:/usr/java/jdk1.6.0_27/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
2017-3-15 13:20:38 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-28080
2017-3-15 13:20:38 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 385 ms
2017-3-15 13:20:38 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2017-3-15 13:20:38 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.41
2017-3-15 13:20:38 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor manager.xml
2017-3-15 13:20:38 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor host-manager.xml
2017-3-15 13:20:39 org.apache.catalina.startup.HostConfig deployWAR
信息: Deploying web application archive hami.war
2017-3-15 13:20:44 org.apache.catalina.startup.HostConfig deployWAR
信息: Deploying web application archive musicStar.war
2017-3-15 13:20:44 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(/opt/tomcat/apache-tomcat-6.0.41/webapps/musicStar/WEB-INF/lib/servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
2017-3-15 13:20:44 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(/opt/tomcat/apache-tomcat-6.0.41/webapps/musicStar/WEB-INF/lib/servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
2017-3-15 13:20:49 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory SmartHardware

 

下面是server.xml的信息

<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
--><!-- Note:  A "Server" is not itself a "Container", so you may not
     define subcomponents such as "Valves" at this level.
     Documentation at /docs/config/server.html
 --><Server port="8105" shutdown="SHUTDOWN">

  <!--APR library loader. Documentation at /docs/apr.html -->
  <Listener SSLEngine="on" className="org.apache.catalina.core.AprLifecycleListener"/>
  <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
  <Listener className="org.apache.catalina.core.JasperListener"/>
  <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
  <!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>

  <!-- Global JNDI resources
       Documentation at /docs/jndi-resources-howto.html
  -->
  <GlobalNamingResources>
    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users
    -->
    <Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/>
  </GlobalNamingResources>

  <!-- A "Service" is a collection of one or more "Connectors" that share
       a single "Container" Note:  A "Service" is not itself a "Container",
       so you may not define subcomponents such as "Valves" at this level.
       Documentation at /docs/config/service.html
   -->
  <Service name="Catalina">
    <Connector connectionTimeout="20000" port="28080" protocol="HTTP/1.1" redirectPort="8443" useBodyEncodingForURI="true"  disableUploadTimeout="true"/>
    <Connector port="8109" protocol="AJP/1.3" redirectPort="8443"/>
    <Engine defaultHost="localhost" name="Catalina">
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
      <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false">
<Context path="/versionCon" reloadable="true" docBase="/opt/tomcat/apache-tomcat-6.0.41/webapps"/>
      </Host>
    </Engine>
  </Service>
</Server>

 

加载中
0
moliunian
moliunian

你访问的是哪个context?看下已经部署上来了没? 在tomcat的work里面可以看到部署成功的context

 

0
火眼金睛容嬷嬷
火眼金睛容嬷嬷

window和linux之间的差别大概就是文件目录权限的差异了吧。

返回顶部
顶部