我已经在tomcat服务器中部署了一个spring mvc项目的.war文件但是我得到了error 404 saying that the resource is not available
除了我的以外,tomcat服务器上的所有其他示例应用程序都在运行。我在这里看到了其他类似的问题,并且我已经跟踪了他们中的每个人并且仍然遇到错误。
我已将项目映射为/advocatoree/dashboard
有人可以帮我吗?
这是我的日志:
10-Jan-2015 19:07:54.909 SEVERE [main] org.apache.catalina.startup.Catalina.stopServer Could not contact localhost:8005. Tomcat may not be running.
10-Jan-2015 19:08:00.140 SEVERE [main] org.apache.catalina.startup.Catalina.stopServer Could not contact localhost:8005. Tomcat may not be running.
10-Jan-2015 19:08:41.520 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.15
10-Jan-2015 19:08:41.521 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Nov 2 2014 19:25:20 UTC
10-Jan-2015 19:08:41.522 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.15.0
10-Jan-2015 19:08:41.522 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 7
10-Jan-2015 19:08:41.522 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.1
10-Jan-2015 19:08:41.523 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: x86
10-Jan-2015 19:08:41.523 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JAVA_HOME: C:\Program Files\Java\jdk1.7.0_25\jre
10-Jan-2015 19:08:41.523 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.7.0_25-b17
10-Jan-2015 19:08:41.523 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
10-Jan-2015 19:08:41.524 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\tomcat
10-Jan-2015 19:08:41.524 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\tomcat
10-Jan-2015 19:08:41.525 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\tomcat\conf\logging.properties
10-Jan-2015 19:08:41.525 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
10-Jan-2015 19:08:41.526 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=C:\tomcat\endorsed
10-Jan-2015 19:08:41.526 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\tomcat
10-Jan-2015 19:08:41.527 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\tomcat
10-Jan-2015 19:08:41.527 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\tomcat\temp
10-Jan-2015 19:08:41.528 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.1.32 using APR version 1.5.1.
10-Jan-2015 19:08:41.529 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
10-Jan-2015 19:08:42.631 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.1j 15 Oct 2014)
10-Jan-2015 19:08:43.038 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-8080"]
10-Jan-2015 19:08:43.066 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-apr-8009"]
10-Jan-2015 19:08:43.083 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 2295 ms
10-Jan-2015 19:08:43.136 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
10-Jan-2015 19:08:43.137 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.15
10-Jan-2015 19:08:43.161 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\tomcat\webapps\docs
10-Jan-2015 19:08:43.626 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\tomcat\webapps\docs has finished in 464 ms
10-Jan-2015 19:08:43.626 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\tomcat\webapps\examples
10-Jan-2015 19:08:44.935 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\tomcat\webapps\examples has finished in 1,309 ms
10-Jan-2015 19:08:44.936 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\tomcat\webapps\host-manager
10-Jan-2015 19:08:44.984 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\tomcat\webapps\host-manager has finished in 48 ms
10-Jan-2015 19:08:44.985 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\tomcat\webapps\manager
10-Jan-2015 19:08:45.066 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\tomcat\webapps\manager has finished in 81 ms
10-Jan-2015 19:08:45.066 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\tomcat\webapps\ROOT
10-Jan-2015 19:08:45.161 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\tomcat\webapps\ROOT has finished in 94 ms
10-Jan-2015 19:08:45.168 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-apr-8080"]
10-Jan-2015 19:08:45.177 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-apr-8009"]
10-Jan-2015 19:08:45.179 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 2095 ms
10-Jan-2015 19:11:26.206 INFO [main] org.apache.catalina.core.StandardServer.await A valid shutdown command was received via the shutdown port. Stopping the Server instance.
10-Jan-2015 19:11:26.208 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-apr-8080"]
10-Jan-2015 19:11:26.266 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-apr-8009"]
10-Jan-2015 19:11:26.319 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
10-Jan-2015 19:11:26.368 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-apr-8080"]
10-Jan-2015 19:11:26.421 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-apr-8009"]
10-Jan-2015 19:11:26.471 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-apr-8080"]
10-Jan-2015 19:11:26.472 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-apr-8009"]
10-Jan-2015 19:11:29.674 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.15
10-Jan-2015 19:11:29.675 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Nov 2 2014 19:25:20 UTC
10-Jan-2015 19:11:29.676 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.15.0
10-Jan-2015 19:11:29.676 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 7
10-Jan-2015 19:11:29.676 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.1
10-Jan-2015 19:11:29.677 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: x86
10-Jan-2015 19:11:29.677 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JAVA_HOME: C:\Program Files\Java\jdk1.7.0_25\jre
10-Jan-2015 19:11:29.677 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.7.0_25-b17
10-Jan-2015 19:11:29.677 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
10-Jan-2015 19:11:29.678 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\tomcat
10-Jan-2015 19:11:29.678 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\tomcat
10-Jan-2015 19:11:29.678 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\tomcat\conf\logging.properties
10-Jan-2015 19:11:29.679 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
10-Jan-2015 19:11:29.680 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=C:\tomcat\endorsed
10-Jan-2015 19:11:29.682 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\tomcat
10-Jan-2015 19:11:29.682 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\tomcat
10-Jan-2015 19:11:29.683 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\tomcat\temp
10-Jan-2015 19:11:29.684 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.1.32 using APR version 1.5.1.
10-Jan-2015 19:11:29.684 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
10-Jan-2015 19:11:30.776 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.1j 15 Oct 2014)
10-Jan-2015 19:11:30.943 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-8080"]
10-Jan-2015 19:11:30.968 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-apr-8009"]
10-Jan-2015 19:11:30.984 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1783 ms
10-Jan-2015 19:11:31.018 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
10-Jan-2015 19:11:31.018 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.15
10-Jan-2015 19:11:31.033 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\tomcat\webapps\docs
10-Jan-2015 19:11:31.394 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\tomcat\webapps\docs has finished in 361 ms
10-Jan-2015 19:11:31.395 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\tomcat\webapps\examples
10-Jan-2015 19:11:32.041 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\tomcat\webapps\examples has finished in 645 ms
10-Jan-2015 19:11:32.042 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\tomcat\webapps\host-manager
10-Jan-2015 19:11:32.082 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\tomcat\webapps\host-manager has finished in 40 ms
10-Jan-2015 19:11:32.083 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\tomcat\webapps\manager
10-Jan-2015 19:11:32.150 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\tomcat\webapps\manager has finished in 67 ms
10-Jan-2015 19:11:32.151 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\tomcat\webapps\ROOT
10-Jan-2015 19:11:32.224 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\tomcat\webapps\ROOT has finished in 73 ms
10-Jan-2015 19:11:32.230 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-apr-8080"]
10-Jan-2015 19:11:32.240 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-apr-8009"]
10-Jan-2015 19:11:32.241 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 1256 ms
10-Jan-2015 19:12:18.361 INFO [http-apr-8080-exec-3] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive C:\tomcat\webapps\Advocatoree.war
10-Jan-2015 19:12:29.550 INFO [http-apr-8080-exec-3] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive C:\tomcat\webapps\Advocatoree.war has finished in 11,190 ms
10-Jan-2015 19:21:12.336 WARNING [http-apr-8080-exec-8] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [Advocatoree] 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.
10-Jan-2015 19:21:12.337 WARNING [http-apr-8080-exec-8] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [Advocatoree] 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. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:40)
10-Jan-2015 19:21:13.042 INFO [http-apr-8080-exec-8] org.apache.catalina.startup.HostConfig.undeploy Undeploying context [/Advocatoree]
10-Jan-2015 19:21:35.779 INFO [http-apr-8080-exec-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive C:\tomcat\webapps\Advocatoree.war
10-Jan-2015 19:21:46.674 INFO [http-apr-8080-exec-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive C:\tomcat\webapps\Advocatoree.war has finished in 10,895 ms
答案 0 :(得分:1)
我注意到应用程序上下文是“/ Advocatoree”,来自附加日志中的最后一行而不是“/ advocatoree”尝试将a更改为大写A
答案 1 :(得分:1)
我正在使用tomcat 8,它在tomcat的conf中有一个名为context.xml的文件。我添加了一行
path="" docBase="NameOfWar" debug="0" reloadable="true"
位于<Context></Context>
标记内的该文件中,并且有效。