Enabling Both HTTP and HTTPS for an Application in Tomcat 8 - https

I have one application deployed in Tomcat 8, which i want to run on http and https both. I have configured server.xml to run both on http and https. web.xml for application is also configured to handle both requests. Issue is i am getting response for https requests only. For http it says request timed out.
https port configured is 9999 and http port is 8080.
https://URL:9999/path => working
http://URL:8080/path => not working
Below is attached code for server.xml , web.xml inside WEB-INF directory and catalina.out response when i start Tomcat.
SERVER.XML
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"/>
<Connector
protocol="org.apache.coyote.http11.Http11NioProtocol"
port="9999" maxThreads="200"
scheme="https" secure="true" SSLEnabled="true"
keystoreFile="/root/.keystore" keystorePass="Pooltooadm!n"
clientAuth="false" sslProtocol="TLS"/>
web.xml
<welcome-file-list>
<welcome-file>/index.html</welcome-file>
<welcome-file>/index.xhtml</welcome-file>
<welcome-file>/index.htm</welcome-file>
<welcome-file>/index.jsp</welcome-file>
</welcome-file-list>
<security-constraint>
<web-resource-collection>
<web-resource-name>HTTP</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>HTTPS</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<error-page>
<error-code>404</error-code>
<location>/index.html</location>
</error-page>
CATALINA.OUT=>
17-Nov-2017 14:07:46.349 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.5.23
17-Nov-2017 14:07:46.433 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Sep 28 2017 10:30:11 UTC
17-Nov-2017 14:07:46.593 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.5.23.0
17-Nov-2017 14:07:46.593 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
17-Nov-2017 14:07:46.593 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.4.21-90-default
17-Nov-2017 14:07:46.593 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
17-Nov-2017 14:07:46.593 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/java/jdk1.8.0_151/jre
17-Nov-2017 14:07:46.594 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_151-b12
17-Nov-2017 14:07:46.594 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
17-Nov-2017 14:07:46.594 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /opt/apache-tomcat-8.5.23
17-Nov-2017 14:07:46.594 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /opt/apache-tomcat-8.5.23
17-Nov-2017 14:07:46.594 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/apache-tomcat-8.5.23/conf/logging.properties
17-Nov-2017 14:07:46.595 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
17-Nov-2017 14:07:46.595 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
17-Nov-2017 14:07:46.637 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
17-Nov-2017 14:07:46.637 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/apache-tomcat-8.5.23
17-Nov-2017 14:07:46.637 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/apache-tomcat-8.5.23
17-Nov-2017 14:07:46.637 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/apache-tomcat-8.5.23/temp
17-Nov-2017 14:07:46.637 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
17-Nov-2017 14:07:51.020 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
17-Nov-2017 14:07:51.711 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
17-Nov-2017 14:07:51.832 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["https-jsse-nio-9999"]
17-Nov-2017 14:08:00.507 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
17-Nov-2017 14:08:00.509 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
17-Nov-2017 14:08:00.510 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
17-Nov-2017 14:08:00.592 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 28123 ms
17-Nov-2017 14:08:01.206 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
17-Nov-2017 14:08:01.207 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.23
17-Nov-2017 14:08:01.495 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/apache-tomcat-8.5.23/webapps/host-manager]
17-Nov-2017 14:08:11.450 WARNING [localhost-startStop-1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [159] milliseconds.
17-Nov-2017 14:08:12.311 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/apache-tomcat-8.5.23/webapps/host-manager] has finished in [10,816] ms
17-Nov-2017 14:08:12.312 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/apache-tomcat-8.5.23/webapps/manager]
17-Nov-2017 14:08:12.924 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/apache-tomcat-8.5.23/webapps/manager] has finished in [612] ms
17-Nov-2017 14:08:12.924 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/apache-tomcat-8.5.23/webapps/docs]
17-Nov-2017 14:08:13.415 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/apache-tomcat-8.5.23/webapps/docs] has finished in [491] ms
17-Nov-2017 14:08:13.415 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/apache-tomcat-8.5.23/webapps/ROOT]
17-Nov-2017 14:08:13.825 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/apache-tomcat-8.5.23/webapps/ROOT] has finished in [409] ms
17-Nov-2017 14:08:13.825 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/apache-tomcat-8.5.23/webapps/examples]
17-Nov-2017 14:08:20.096 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/apache-tomcat-8.5.23/webapps/examples] has finished in [6,271] ms
17-Nov-2017 14:08:20.097 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/apache-tomcat-8.5.23/webapps/pooltooadmin]
17-Nov-2017 14:08:20.549 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/apache-tomcat-8.5.23/webapps/pooltooadmin] has finished in [451] ms
17-Nov-2017 14:08:20.836 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
17-Nov-2017 14:08:20.999 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["https-jsse-nio-9999"]
17-Nov-2017 14:08:21.163 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
17-Nov-2017 14:08:21.204 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 20612 ms

Was able to this by configuring web.xml as follows:-
<security-constraint>
<web-resource-collection>
<web-resource-name>Support Both HTTP and HTTPS</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<!-- <transport-guarantee>NONE</transport-guarantee> -->
</user-data-constraint>
</security-constraint>

Maybe port 8080 is taken already. If you have apache2 on your server the default port for apache2 is 8080. Try another port or check:
sudo netstat -tulpn |grep apache

Related

Spring boot not running on external Tomcat 10

Spring boot not running on external tomcat
I have previously worked with Spring Boot on Java 1.8 and Tomcat 8.
I recently started a new project where I upgraded to Java 17, Tomcat 10.
I'm trying to deploy as a war to run in an external tomcat, but it doesn't work.
I ran and deployed the project without any problems in the existing Java 1.8 and Tomcat 8 in the actual production environment.
I think you know how to deploy spring boot as war.
I have read the Spring Boot official documentation at the link below.
https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto.traditional-deployment.war
My project's pom.xml has the settings below applied.
<packaging>war</packaging>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
And
<configuration>
<mainClass>mypackage.SpringBootCoreApplication</mainClass>
</configuration>
And SpringBootApplication is also configured.
#SpringBootApplication
public class SpringBootCoreApplication extends SpringBootServletInitializer {
#Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(SpringBootCoreApplication.class);
}
public static void main(String[] args) {
SpringApplication.run(SpringBootCoreApplication.class, args);
}
}
Now, I ran Tomcat to deploy as war, and the following log came out.
31-Oct-2022 19:52:47.382 INFO [main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
31-Oct-2022 19:52:43.818 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/usr/local/tomcat/webapps/ROOT.war]
31-Oct-2022 19:52:43.780 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/10.1.1]
31-Oct-2022 19:52:43.779 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
31-Oct-2022 19:52:43.686 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [961] milliseconds
31-Oct-2022 19:52:43.618 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
31-Oct-2022 19:52:43.069 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 3.0.2 15 Mar 2022]
31-Oct-2022 19:52:43.063 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [2.0.1] using APR version [1.7.0].
31-Oct-2022 19:52:43.059 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
31-Oct-2022 19:52:43.059 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
31-Oct-2022 19:52:43.059 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
31-Oct-2022 19:52:43.058 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
31-Oct-2022 19:52:43.058 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
31-Oct-2022 19:52:43.058 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
31-Oct-2022 19:52:43.058 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
31-Oct-2022 19:52:43.058 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
31-Oct-2022 19:52:43.058 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
31-Oct-2022 19:52:43.058 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
31-Oct-2022 19:52:43.057 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED
31-Oct-2022 19:52:43.057 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
31-Oct-2022 19:52:43.057 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
31-Oct-2022 19:52:43.033 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/local/tomcat
31-Oct-2022 19:52:43.033 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/local/tomcat
31-Oct-2022 19:52:43.033 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Eclipse Adoptium
31-Oct-2022 19:52:43.032 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 17.0.4.1+1
31-Oct-2022 19:52:43.032 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /opt/java/openjdk
31-Oct-2022 19:52:43.031 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
31-Oct-2022 19:52:43.031 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.4.180+
31-Oct-2022 19:52:43.031 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
31-Oct-2022 19:52:43.030 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 10.1.1.0
31-Oct-2022 19:52:43.030 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Oct 3 2022 12:42:14 UTC
31-Oct-2022 19:52:43.017 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/10.1.1
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
Using CATALINA_OPTS:
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Using JRE_HOME: /opt/java/openjdk
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_BASE: /usr/local/tomcat
31-Oct-2022 19:52:41.636 INFO [Thread-1] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
31-Oct-2022 19:52:41.627 INFO [Thread-1] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
31-Oct-2022 19:52:41.612 INFO [Thread-1] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
31-Oct-2022 19:52:41.608 INFO [Thread-1] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
31-Oct-2022 19:48:16.236 INFO [Catalina-utility-2] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/usr/local/tomcat/webapps/ROOT.war] has finished in [4,098] ms
Spring Boot as I remember it doesn't end up with logs like this. The project is running but spring boot doesn't seem to be running.
The log shows that it was successful, but it doesn't actually connect.
I read the official Spring Boot documentation, many questions/answers, and blog posts, but I couldn't solve it.
I don't know what I have configured wrong. please help me
I found the reason.
I am writing this for those of you who are struggling for the same reason.
Upgrading to Tomcat 10 was a problem.
Tomcat10 is an implementation of the JakartaEE specification that is not currently supported.
Spring (and Spring Boot) currently only supports JavaEE, not JakartaEE.
Jakarta EE support is planned for Spring6 and SpringBoot3 expected later this year.
There are two options.
Deploy the war to the webapps-javaee directory instead of the webapps directory. Tomcat uses a conversion tool to convert automatically. I solved the same problem with this.
Using Tomcat 9 with Java EE support
Deploying the war to the webapps-javaee directory instead of the webapps directory worked for me.
Deploying the war to the webapps-javaee directory instead of the webapps directory worked. Therefore the problem with deplyment on Tomcat 10 worked!!!

Problem deploying my war file with tomcat

So iwasted nearly a day trying to get tomcat to accept my .war, so maybe you guys can help me.
What I did:
copied .war file to /webapps directory
stoppped tomcat using "sudo systemctl stop tomcat8"
started tomcat using "sudo systemctl start tomcat8"
Afterwards i checked if my app was there and still got the default "It Works!" page of tomcat back. So i checked catalina.out and there were this lines:
25-Aug-2020 22:14:24.403 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
25-Aug-2020 22:14:24.404 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.54 (Debian)
25-Aug-2020 22:14:24.480 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/var/lib/tomcat8/webapps/demo-0.0.1-SNAPSHOT.war]
25-Aug-2020 22:14:25.324 WARNING [localhost-startStop-1] org.apache.tomcat.util.descriptor.web.WebXml.setVersion Unknown version string [4.0]. Default version will be used.
25-Aug-2020 22:14:37.168 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JS$
25-Aug-2020 22:14:37.785 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/var/lib/tomcat8/webapps/demo-0.0.1-SNAPSHOT.war] has finished in [13,303] ms
25-Aug-2020 22:14:37.788 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/var/lib/tomcat8/webapps/ROOT]
25-Aug-2020 22:14:39.592 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JS$
25-Aug-2020 22:14:39.602 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/var/lib/tomcat8/webapps/ROOT] has finished in [1,815] ms
25-Aug-2020 22:14:39.648 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
25-Aug-2020 22:14:39.694 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 15388 ms
So I assumed the problem was that the stadard ROOT app was deployed after my demo-0.0.1-SNAPSHOT.war app. So i deleted the ROOT folder and restarted the server but my service is still not reachable. Now I just get a 404 error page. catalina.out:
25-Aug-2020 22:36:17.865 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
25-Aug-2020 22:36:17.865 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.54 (Debian)
25-Aug-2020 22:36:17.941 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/var/lib/tomcat8/webapps/demo-0.0.1-SNAPSHOT.war]
25-Aug-2020 22:36:18.806 WARNING [localhost-startStop-1] org.apache.tomcat.util.descriptor.web.WebXml.setVersion Unknown version string [4.0]. Default version will be used.
25-Aug-2020 22:36:30.742 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JS$
25-Aug-2020 22:36:31.339 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/var/lib/tomcat8/webapps/demo-0.0.1-SNAPSHOT.war] has finished in [13,396] ms
25-Aug-2020 22:36:31.349 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
25-Aug-2020 22:36:31.380 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 13611 ms
So it literally is deploying my war file - but anyhow not completely.
i tried to call the service with {ip}:80/ and {ip}:80/demo-0.0.1-SNAPSHOT/
Additional information:
the tomcat is located on a raspberry pi that is about 100km away from me right now
the raspberry pi also hosts a pi-hole for the network there
the catalina.out log had additional lines (with warnings) at every of the two startups. I'm posting the complete log from the first startup at the end
I hope I've given enough information!
Thank you in advance
25-Aug-2020 22:13:21.422 INFO [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/var/lib/tomcat8/webapps/demo-0.0.1-SNAPSHOT.war]
25-Aug-2020 22:13:22.213 WARNING [localhost-startStop-2] org.apache.tomcat.util.descriptor.web.WebXml.setVersion Unknown version string [4.0]. Default version will be used.
25-Aug-2020 22:13:34.872 INFO [localhost-startStop-2] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
25-Aug-2020 22:13:35.146 INFO [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/var/lib/tomcat8/webapps/demo-0.0.1-SNAPSHOT.war] has finished in [13,723] ms
25-Aug-2020 22:14:15.314 INFO [Thread-4] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
25-Aug-2020 22:14:15.337 INFO [Thread-4] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
25-Aug-2020 22:14:15.460 INFO [Thread-4] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
25-Aug-2020 22:14:15.467 INFO [Thread-4] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
25-Aug-2020 22:14:22.166 WARNING [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/var/lib/tomcat8/common/classes], exists: [false], isDirectory: [false], canRead: [false]
25-Aug-2020 22:14:22.176 WARNING [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/var/lib/tomcat8/common], exists: [false], isDirectory: [false], canRead: [false]
25-Aug-2020 22:14:22.177 WARNING [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/usr/share/tomcat8/common/classes], exists: [false], isDirectory: [false], canRead: [false]
25-Aug-2020 22:14:22.177 WARNING [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/usr/share/tomcat8/common], exists: [false], isDirectory: [false], canRead: [false]
25-Aug-2020 22:14:22.181 WARNING [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/var/lib/tomcat8/server/classes], exists: [false], isDirectory: [false], canRead: [false]
25-Aug-2020 22:14:22.182 WARNING [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/var/lib/tomcat8/server], exists: [false], isDirectory: [false], canRead: [false]
25-Aug-2020 22:14:22.183 WARNING [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/usr/share/tomcat8/server/classes], exists: [false], isDirectory: [false], canRead: [false]
25-Aug-2020 22:14:22.184 WARNING [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/usr/share/tomcat8/server], exists: [false], isDirectory: [false], canRead: [false]
25-Aug-2020 22:14:22.186 WARNING [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/var/lib/tomcat8/shared/classes], exists: [false], isDirectory: [false], canRead: [false]
25-Aug-2020 22:14:22.186 WARNING [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/var/lib/tomcat8/shared], exists: [false], isDirectory: [false], canRead: [false]
25-Aug-2020 22:14:22.187 WARNING [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/usr/share/tomcat8/shared/classes], exists: [false], isDirectory: [false], canRead: [false]
25-Aug-2020 22:14:22.188 WARNING [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/usr/share/tomcat8/shared], exists: [false], isDirectory: [false], canRead: [false]
25-Aug-2020 22:14:23.738 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/8.5.54 (Debian)
25-Aug-2020 22:14:23.739 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Jul 22 2020 15:22:27 UTC
25-Aug-2020 22:14:23.739 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 8.5.54.0
25-Aug-2020 22:14:23.740 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
25-Aug-2020 22:14:23.740 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.19.66-v7+
25-Aug-2020 22:14:23.740 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: arm
25-Aug-2020 22:14:23.741 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre
25-Aug-2020 22:14:23.741 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_65-b17
25-Aug-2020 22:14:23.742 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
25-Aug-2020 22:14:23.742 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /var/lib/tomcat8
25-Aug-2020 22:14:23.742 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/share/tomcat8
25-Aug-2020 22:14:23.743 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/var/lib/tomcat8/conf/logging.properties
25-Aug-2020 22:14:23.744 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
25-Aug-2020 22:14:23.744 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true
25-Aug-2020 22:14:23.744 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseConcMarkSweepGC
25-Aug-2020 22:14:23.745 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
25-Aug-2020 22:14:23.745 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
25-Aug-2020 22:14:23.745 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
25-Aug-2020 22:14:23.746 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
25-Aug-2020 22:14:23.746 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/var/lib/tomcat8
25-Aug-2020 22:14:23.747 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/share/tomcat8
25-Aug-2020 22:14:23.747 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/tmp/tomcat8-tomcat8-tmp
25-Aug-2020 22:14:23.747 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/arm:/lib:/usr/lib]
25-Aug-2020 22:14:24.191 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
25-Aug-2020 22:14:24.257 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
25-Aug-2020 22:14:24.305 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1953 ms
25-Aug-2020 22:14:24.403 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
25-Aug-2020 22:14:24.404 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.54 (Debian)
25-Aug-2020 22:14:24.480 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/var/lib/tomcat8/webapps/demo-0.0.1-SNAPSHOT.war]
25-Aug-2020 22:14:25.324 WARNING [localhost-startStop-1] org.apache.tomcat.util.descriptor.web.WebXml.setVersion Unknown version string [4.0]. Default version will be used.
25-Aug-2020 22:14:37.168 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
25-Aug-2020 22:14:37.785 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/var/lib/tomcat8/webapps/demo-0.0.1-SNAPSHOT.war] has finished in [13,303] ms
25-Aug-2020 22:14:37.788 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/var/lib/tomcat8/webapps/ROOT]
25-Aug-2020 22:14:39.592 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
25-Aug-2020 22:14:39.602 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/var/lib/tomcat8/webapps/ROOT] has finished in [1,815] ms
25-Aug-2020 22:14:39.648 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
25-Aug-2020 22:14:39.694 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 15388 ms

SpringMVC Contextloader don't start

I am newer to spring.
I use intellij for developying
first i create a maven webapp, then add spring mvc framework support
this is my project structure
but when the project starting, I don't find any log about spring
10-Dec-2016 16:20:51.451 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /home/xujifa/.IntelliJIdea2016.3/system/tomcat/Unnamed_demoweb
10-Dec-2016 16:20:51.451 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /var/lib/tomcat8
10-Dec-2016 16:20:51.452 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/home/xujifa/.IntelliJIdea2016.3/system/tomcat/Unnamed_demoweb/conf/logging.properties
10-Dec-2016 16:20:51.452 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
10-Dec-2016 16:20:51.452 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
10-Dec-2016 16:20:51.452 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
10-Dec-2016 16:20:51.452 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
10-Dec-2016 16:20:51.452 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
10-Dec-2016 16:20:51.452 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
10-Dec-2016 16:20:51.453 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
10-Dec-2016 16:20:51.453 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
10-Dec-2016 16:20:51.453 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/home/xujifa/.IntelliJIdea2016.3/system/tomcat/Unnamed_demoweb
10-Dec-2016 16:20:51.453 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/var/lib/tomcat8
10-Dec-2016 16:20:51.453 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/var/lib/tomcat8/temp
10-Dec-2016 16:20:51.453 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /opt/idea/bin:/opt/idea/bin::/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
10-Dec-2016 16:20:51.579 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
10-Dec-2016 16:20:51.592 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
10-Dec-2016 16:20:51.596 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
10-Dec-2016 16:20:51.605 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
10-Dec-2016 16:20:51.606 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 534 ms
10-Dec-2016 16:20:51.676 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
10-Dec-2016 16:20:51.676 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.8
10-Dec-2016 16:20:51.690 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [http-nio-8080]
10-Dec-2016 16:20:51.696 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [ajp-nio-8009]
10-Dec-2016 16:20:51.698 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 92 ms
Connected to server
[2016-12-10 04:20:52,002] Artifact demoweb:war exploded: Artifact is being deployed, please wait...
10-Dec-2016 16:20:52.776 INFO [RMI TCP Connection(2)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
[2016-12-10 04:20:52,848] Artifact demoweb:war exploded: Artifact is deployed successfully
any one can tell me how to resolve it
thanks
I have find the problem
There was something about my artifacts

After adding ContextLoaderListener in web.xml, my Tomcat cannot startup

Operating system: Mac OS
JDK version: 1.7.0_79
Tomcat version: 8.0.29
My web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- spring listener -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- spring -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring/applicationContext.xml</param-value>
</context-param>
<!-- SpringMVC -->
<servlet>
<servlet-name>springmvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:springmvc/spring-mvc.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springmvc</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
</web-app>
The tomcat startup message:
/Users/wengliemiao/Documents/study/apache-tomcat-8.0.29-idea2/bin/catalina.sh run
[2016-01-02 03:30:53,918] Artifact CrowFunding:war exploded: Server is not connected. Deploy is not available.
02-Jan-2016 15:30:54.920 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.29
02-Jan-2016 15:30:54.922 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Nov 20 2015 09:18:00 UTC
02-Jan-2016 15:30:54.922 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.29.0
02-Jan-2016 15:30:54.922 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Mac OS X
02-Jan-2016 15:30:54.922 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.11.1
02-Jan-2016 15:30:54.922 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: x86_64
02-Jan-2016 15:30:54.922 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre
02-Jan-2016 15:30:54.922 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.7.0_79-b15
02-Jan-2016 15:30:54.923 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
02-Jan-2016 15:30:54.923 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /Users/wengliemiao/Library/Caches/IntelliJIdea15/tomcat/Unnamed_CrowFunding_3
02-Jan-2016 15:30:54.923 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /Users/wengliemiao/Documents/study/apache-tomcat-8.0.29-idea2
02-Jan-2016 15:30:54.924 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/Users/wengliemiao/Library/Caches/IntelliJIdea15/tomcat/Unnamed_CrowFunding_3/conf/logging.properties
02-Jan-2016 15:30:54.924 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
02-Jan-2016 15:30:54.924 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
02-Jan-2016 15:30:54.924 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
02-Jan-2016 15:30:54.924 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
02-Jan-2016 15:30:54.924 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
02-Jan-2016 15:30:54.925 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
02-Jan-2016 15:30:54.925 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=/Users/wengliemiao/Documents/study/apache-tomcat-8.0.29-idea2/endorsed
02-Jan-2016 15:30:54.925 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/Users/wengliemiao/Library/Caches/IntelliJIdea15/tomcat/Unnamed_CrowFunding_3
02-Jan-2016 15:30:54.925 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/Users/wengliemiao/Documents/study/apache-tomcat-8.0.29-idea2
02-Jan-2016 15:30:54.925 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/Users/wengliemiao/Documents/study/apache-tomcat-8.0.29-idea2/temp
02-Jan-2016 15:30:54.925 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /Users/wengliemiao/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
02-Jan-2016 15:30:55.064 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
02-Jan-2016 15:30:55.087 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
02-Jan-2016 15:30:55.090 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
02-Jan-2016 15:30:55.093 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
02-Jan-2016 15:30:55.093 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 592 ms
02-Jan-2016 15:30:55.124 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
02-Jan-2016 15:30:55.124 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.29
02-Jan-2016 15:30:55.138 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
02-Jan-2016 15:30:55.150 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
02-Jan-2016 15:30:55.151 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 58 ms
Connected to server
[2016-01-02 03:30:55,474] Artifact CrowFunding:war exploded: Artifact is being deployed, please wait...
02-Jan-2016 15:30:57.248 INFO [RMI TCP Connection(2)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
02-Jan-2016 15:31:05.142 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /Users/wengliemiao/Documents/study/apache-tomcat-8.0.29-idea2/webapps/manager
02-Jan-2016 15:31:05.184 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /Users/wengliemiao/Documents/study/apache-tomcat-8.0.29-idea2/webapps/manager has finished in 42 ms
02-Jan-2016 15:41:18.744 WARNING [main] org.apache.catalina.core.StandardServer.await StandardServer.await: Invalid command '' received
My problem is that: the tomcat just cannot startup. And when I remove the ContextLoaderListener, the application can startup, But it will have org.springframework.beans.factory.BeanCreationException appear.

.war file deployed in tomcat server but getting Error 404 that is resource not available

I have deployed my .war file of a spring mvc project in tomcat server but I'm getting an error 404 saying that the resource is not available
All the other example applications on tomcat server is running except for mine. I have seen the other similar questions here and I've followed everyone of them and still getting error.
I have mapped the project as /advocatoree/dashboard
Can someone please help me with it?
This is my log:
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
i notice that the application context is "/Advocatoree" from the last lines in your attached log not "/advocatoree" try to change a to capital A
I'm using tomcat 8 and it had a file called context.xml in tomcat's conf. I added the line
path="" docBase="NameOfWar" debug="0" reloadable="true"
in that file inside the <Context></Context> tag and it worked.

Resources