Getting exception while deploying adf application in Apache tomcat server - java

I have developed an Oracle ADF application and configured the Data source name and made changes as mentioned here .After deploying the ADF war file in webapps folder I clicked on start command from tomcat web application manager console at localhost:8080/manager/html/start then i am getting
below message
FAIL - Application at context path [/HrEntry_ViewController1_webapp]
could not be started FAIL - Encountered exception
[org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/HrEntry_ViewController1_webapp]]]
Below is the catalina log
04-Apr-2018 02:07:38.227 INFO [localhost-startStop-2]
org.apache.catalina.startup.HostConfig.deployWAR Deploying web
application archive [C:\Program Files\Apache Software
Foundation\Tomcat 8.5\webapps\sample.war]
04-Apr-2018 02:07:44.133 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.
04-Apr-2018 02:07:44.164 INFO [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web
application archive [C:\Program Files\Apache Software
Foundation\Tomcat 8.5\webapps\sample.war] has finished in [5,953] ms
04-Apr-2018 02:07:54.180 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]]
org.apache.catalina.startup.HostConfig.undeploy Undeploying context
[/sample]
04-Apr-2018 02:07:54.258 INFO [localhost-startStop-3] org.apache.catalina.startup.HostConfig.deployWAR Deploying web
application archive [C:\Program Files\Apache Software
Foundation\Tomcat 8.5\webapps\sample.war]
04-Apr-2018 02:07:58.242 INFO [localhost-startStop-3] 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.
04-Apr-2018 02:07:58.242 INFO [localhost-startStop-3] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web
application archive [C:\Program Files\Apache Software
Foundation\Tomcat 8.5\webapps\sample.war] has finished in [3,984] ms
04-Apr-2018 02:08:21.007 INFO [Thread-6] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler
["http-nio-8080"]
04-Apr-2018 02:08:21.117 INFO [Thread-6] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler
["ajp-nio-8009"]
04-Apr-2018 02:08:21.195 INFO [Thread-6] org.apache.catalina.core.StandardService.stopInternal Stopping service
[Catalina]
04-Apr-2018 02:08:21.241 INFO [Thread-6] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler
["http-nio-8080"]
04-Apr-2018 02:08:21.241 INFO [Thread-6] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler
["ajp-nio-8009"]
04-Apr-2018 02:08:34.101 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:
Apache Tomcat/8.5.29
04-Apr-2018 02:08:34.101 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:
Mar 5 2018 13:11:12 UTC
04-Apr-2018 02:08:34.101 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:
8.5.29.0
04-Apr-2018 02:08:34.101 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:
Windows Server 2012 R2
04-Apr-2018 02:08:34.101 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:
6.3
04-Apr-2018 02:08:34.101 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:
amd64
04-Apr-2018 02:08:34.101 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:
C:\Program Files\Java\jre1.8.0_161
04-Apr-2018 02:08:34.101 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:
1.8.0_161-b12
04-Apr-2018 02:08:34.101 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:
Oracle Corporation
04-Apr-2018 02:08:34.101 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:
C:\Program Files\Apache Software Foundation\Tomcat 8.5
04-Apr-2018 02:08:34.101 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:
C:\Program Files\Apache Software Foundation\Tomcat 8.5
04-Apr-2018 02:08:34.101 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line
argument: -Dcatalina.home=C:\Program Files\Apache Software
Foundation\Tomcat 8.5
04-Apr-2018 02:08:34.101 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line
argument: -Dcatalina.base=C:\Program Files\Apache Software
Foundation\Tomcat 8.5
04-Apr-2018 02:08:34.101 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line
argument: -Djava.io.tmpdir=C:\Program Files\Apache Software
Foundation\Tomcat 8.5\temp
04-Apr-2018 02:08:34.101 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line
argument:
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
04-Apr-2018 02:08:34.101 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line
argument: -Djava.util.logging.config.file=C:\Program Files\Apache
Software Foundation\Tomcat 8.5\conf\logging.properties
04-Apr-2018 02:08:34.101 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line
argument: exit
04-Apr-2018 02:08:34.101 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line
argument: abort
04-Apr-2018 02:08:34.101 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line
argument: -Xms128m
04-Apr-2018 02:08:34.101 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line
argument: -Xmx256m
04-Apr-2018 02:08:34.101 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:
[C:\Program Files\Apache Software Foundation\Tomcat
8.5\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program
Files\Amazon\cfn-bootstrap\;;.]
04-Apr-2018 02:08:34.616 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
["http-nio-8080"]
04-Apr-2018 02:08:34.882 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a
shared selector for servlet write/read
04-Apr-2018 02:08:34.897 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
["ajp-nio-8009"]
04-Apr-2018 02:08:34.897 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a
shared selector for servlet write/read
04-Apr-2018 02:08:34.897 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in
2004 ms
04-Apr-2018 02:08:35.147 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting
service [Catalina]
04-Apr-2018 02:08:35.147 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet
Engine: Apache Tomcat/8.5.29
04-Apr-2018 02:08:35.194 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web
application archive [C:\Program Files\Apache Software
Foundation\Tomcat 8.5\webapps\ADFTomcatDemo_ViewController_webapp.war]
04-Apr-2018 02:08:35.819 WARNING [localhost-startStop-1] org.apache.tomcat.util.scan.StandardJarScanner.processURLs Failed to
scan
[file:/C:/Program%20Files/oracle_common/modules/oracle.osdt/osdt_cert.jar]
from classloader hierarchy
java.io.FileNotFoundException: C:\Program Files\oracle_common\modules\oracle.osdt\osdt_cert.jar (The system
cannot find the path specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(Unknown Source)
at java.util.zip.ZipFile.(Unknown Source)
at java.util.jar.JarFile.(Unknown Source)
at java.util.jar.JarFile.(Unknown Source)
at org.apache.tomcat.util.compat.JreCompat.jarFileNewInstance(JreCompat.java:188)
at org.apache.tomcat.util.scan.JarFileUrlJar.(JarFileUrlJar.java:65)
at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:49)
at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:374)
at org.apache.tomcat.util.scan.StandardJarScanner.processURLs(StandardJarScanner.java:309)
at org.apache.tomcat.util.scan.StandardJarScanner.doScanClassPath(StandardJarScanner.java:266)
at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:229)
at org.apache.catalina.startup.ContextConfig.processJarsForWebFragments(ContextConfig.java:1888)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1116)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:765)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5113)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:986)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Related

netbeans - Tomcat web application deployment failed

I created new web application project in NetBeans with Tomcat as the server. But, when I run the project, I get the BUILD FAILED error. But deploying the web app by copying it into tomcat webapps/ directory works.
The web application netbeans log is as follows:
ant -f "D:\\Harsha Vardhan\\Documents\\My Projects\\Web Projects\\TestApplication" -Dnb.internal.action.name=run -Ddirectory.deployment.supported=true -DforceRedeploy=false -Dnb.wait.for.caches=true "-Dbrowser.context=D:\\Harsha Vardhan\\Documents\\My Projects\\Web Projects\\TestApplication" run
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Starting Tomcat process...
Waiting for Tomcat...
Tomcat server started.
In-place deployment at D:\Harsha Vardhan\Documents\My Projects\Web Projects\TestApplication\build\web
Deployment is in progress...
deploy?config=file%3A%2FC%3A%2FUsers%2FHarsha%2520Vardhan%2FAppData%2FLocal%2FTemp%2Fcontext2833876915741210914.xml&path=/TestApplication
FAIL - Failed to deploy application at context path [/TestApplication]
D:\Harsha Vardhan\Documents\My Projects\Web Projects\TestApplication\nbproject\build-impl.xml:1045: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 8 seconds)
The Tomcat server log is as follows:
Using CATALINA_BASE: "C:\Apache\Tomcat 8.5"
Using CATALINA_HOME: "C:\Apache\Tomcat 8.5"
Using CATALINA_TMPDIR: "C:\Apache\Tomcat 8.5\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk1.8.0_152"
Using CLASSPATH: "C:\Apache\Tomcat 8.5\bin\bootstrap.jar;C:\Apache\Tomcat 8.5\bin\tomcat-juli.jar"
12-Nov-2017 19:17:36.800 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.5.23
12-Nov-2017 19:17:36.800 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Sep 28 2017 10:30:11 UTC
12-Nov-2017 19:17:36.800 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.5.23.0
12-Nov-2017 19:17:36.800 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 10
12-Nov-2017 19:17:36.800 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.0
12-Nov-2017 19:17:36.800 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
12-Nov-2017 19:17:36.800 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\Program Files\Java\jdk1.8.0_152\jre
12-Nov-2017 19:17:36.800 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_152-b16
12-Nov-2017 19:17:36.800 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
12-Nov-2017 19:17:36.800 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Apache\Tomcat 8.5
12-Nov-2017 19:17:36.800 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\Apache\Tomcat 8.5
12-Nov-2017 19:17:36.800 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Apache\Tomcat 8.5\conf\logging.properties
12-Nov-2017 19:17:36.800 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
12-Nov-2017 19:17:36.800 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dhttp.nonProxyHosts=localhost|127.0.0.1|DESKTOP-i7559
12-Nov-2017 19:17:36.800 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
12-Nov-2017 19:17:36.800 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
12-Nov-2017 19:17:36.800 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Apache\Tomcat 8.5
12-Nov-2017 19:17:36.800 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Apache\Tomcat 8.5
12-Nov-2017 19:17:36.800 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\Apache\Tomcat 8.5\temp
12-Nov-2017 19:17:36.800 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.14] using APR version [1.6.2].
12-Nov-2017 19:17:36.800 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
12-Nov-2017 19:17:36.800 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
12-Nov-2017 19:17:37.363 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.0.2l 25 May 2017]
12-Nov-2017 19:17:37.503 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
12-Nov-2017 19:17:37.628 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
12-Nov-2017 19:17:37.628 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
12-Nov-2017 19:17:37.628 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
12-Nov-2017 19:17:37.628 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1158 ms
12-Nov-2017 19:17:37.660 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
12-Nov-2017 19:17:37.660 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.23
12-Nov-2017 19:17:37.660 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Apache\Tomcat 8.5\webapps\docs]
12-Nov-2017 19:17:37.910 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Apache\Tomcat 8.5\webapps\docs] has finished in [250] ms
12-Nov-2017 19:17:37.910 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Apache\Tomcat 8.5\webapps\examples]
12-Nov-2017 19:17:38.816 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Apache\Tomcat 8.5\webapps\examples] has finished in [906] ms
12-Nov-2017 19:17:38.832 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Apache\Tomcat 8.5\webapps\host-manager]
12-Nov-2017 19:17:38.863 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Apache\Tomcat 8.5\webapps\host-manager] has finished in [31] ms
12-Nov-2017 19:17:38.863 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Apache\Tomcat 8.5\webapps\manager]
12-Nov-2017 19:17:38.894 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Apache\Tomcat 8.5\webapps\manager] has finished in [31] ms
12-Nov-2017 19:17:38.894 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Apache\Tomcat 8.5\webapps\ROOT]
12-Nov-2017 19:17:38.910 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Apache\Tomcat 8.5\webapps\ROOT] has finished in [16] ms
12-Nov-2017 19:17:38.910 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
12-Nov-2017 19:17:38.925 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
12-Nov-2017 19:17:38.925 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 1293 ms
java.io.FileNotFoundException: C:\Users\Harsha%20Vardhan\AppData\Local\Temp\context2833876915741210914.xml (The system cannot find the file specified)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at org.apache.catalina.manager.ManagerServlet.copyInternal(ManagerServlet.java:1673)
at org.apache.catalina.manager.ManagerServlet.copy(ManagerServlet.java:1635)
at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:889)
at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:338)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:595)
at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)
at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:52)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Note: Assuming that permissions were a problem, I started netbeans as admin. But, it threw the same error. I even changed the permission for Tomcat_8.5/ directory to full control to the user, But NetBeans kept throwing the same error.

Could not contact localhost:8005. Tomcat may not be running error while shutdown tomcat

Hi I am trying to shutdown and startup tomcat server. But i am getting below error while running shutdown.sh. Please check below error and suggest me to complete.
Error:
Using CATALINA_BASE: /opt/tomcat8
Using CATALINA_HOME: /opt/tomcat8
Using CATALINA_TMPDIR: /opt/tomcat8/temp
Using JRE_HOME: /usr/java/jdk1.8.0_74
Using CLASSPATH: /opt/tomcat8/bin/bootstrap.jar:/opt/tomcat8/bin/tomcat-ju li.jar
Jul 24, 2017 11:01:47 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Could not contact localhost:8005. Tomcat may not be running.
Jul 24, 2017 11:01:48 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.ja va:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocket Impl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java :188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.<init>(Socket.java:434)
at java.net.Socket.<init>(Socket.java:211)
Also please find log:
24-Jul-2017 23:48:28.884 SEVERE [main] org.apache.catalina.core.StandardServer.await StandardServer.await: create[localhost:8005]:
java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
at java.net.ServerSocket.bind(ServerSocket.java:375)
at java.net.ServerSocket.<init>(ServerSocket.java:237)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:420)
at org.apache.catalina.startup.Catalina.await(Catalina.java:717)
at org.apache.catalina.startup.Catalina.start(Catalina.java:663)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)
24-Jul-2017 23:48:28.884 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8082"]
24-Jul-2017 23:48:28.884 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
24-Jul-2017 23:48:28.884 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
24-Jul-2017 23:48:28.988 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8082"]
24-Jul-2017 23:48:28.990 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8082"]
24-Jul-2017 23:48:28.992 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
24-Jul-2017 23:48:28.992 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"]
There is some Application running on port 8005 due to which tomcat is not able to bind network on the port. Your shutdown.sh will throw exception because server is not started yet (as there was an issue in starting the server)
Solution 1(Recommended): Change the port from 8005 to 8006 in /opt/tomcat8/conf/server.xml
Solution 2: Please check which application is using 8005 by netstat -tulnp | grep 8005 and turn it off.
if the timestamps are correct, it suggests that your tomcat startup failed around 23:00 and you tried to shutdown a non existing tomcat service at 11:00 hours
You can try to add
export JRE_HOME=$JAVA_HOME/jre
in /etc/profile,then run
source /etc/profile
it is avalible for me.
http://blog.51cto.com/zero01/2053974. I meet the same problem today. When i want to execute shudown.sh, the log shows that tomcat may not be running, and the connection to port 8005 is refused. When i use netstat -atunp, i find there is no process listening port 8005. So tomcat should fail to start. I search,and find the answer in the link showed below. The key is to change $JAVA_HOME/jre/lib/security/java.security. The data to change is to add char 'u' before 'random':
securerandom.source=file:/dev/urandom
Or set -Dsecurerandom.source=file:/dev/./urandom in Tomcat's CATALINA_OPTS.
and it works. This helps in a specific scenario of an incomplete Tomcat start up resulting from some operation blocking in '/dev/random' reads in the event of low system entropy. The Tomcat shutdown port is only listening after a full start up, so if a start attempt hangs in a '/dev/random' read or due to any other issue, the shutdown port is not listening and a shutdown attempt relying on it fails with the connection refused error. If start up hangs in '/dev/random', then the urandom change addresses this as /dev/urandom never blocks and hangs waiting for system entropy.
A CATALINA_PID may be set to shutdown Tomcat using a pid file and OS signal without issue in this event instead of the shutdown port.
try to start from ./catalina.sh run
is every thing is ok then it will come on screen
or it will show some error
like in my case
[root#localhost bin]# ./catalina.sh run
Using CATALINA_BASE: /root/Desktop/tomcat/apache-tomcat-8.5.23
Using CATALINA_HOME: /root/Desktop/tomcat/apache-tomcat-8.5.23
Using CATALINA_TMPDIR: /root/Desktop/tomcat/apache-tomcat-8.5.23/temp
Using JRE_HOME: /root/Desktop/jdk1.8.0_144/jre
Using CLASSPATH: /root/Desktop/tomcat/apache-tomcat-8.5.23/bin/bootstrap.jar:/root/Desktop/tomcat/apache-tomcat-8.5.23/bin/tomcat-juli.jar
Invalid maximum heap size: -Xmx512MB
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
change memory heap size then it will definately work
[root#localhost bin]# ./catalina.sh run
Using CATALINA_BASE: /root/Desktop/tomcat/apache-tomcat-8.5.23
Using CATALINA_HOME: /root/Desktop/tomcat/apache-tomcat-8.5.23
Using CATALINA_TMPDIR: /root/Desktop/tomcat/apache-tomcat-8.5.23/temp
Using JRE_HOME: /root/Desktop/jdk1.8.0_144/jre
Using CLASSPATH: /root/Desktop/tomcat/apache-tomcat-8.5.23/bin/bootstrap.jar:/root/Desktop/tomcat/apache-tomcat-8.5.23/bin/tomcat-juli.jar
10-Oct-2017 02:28:13.782 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.5.23
10-Oct-2017 02:28:13.808 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Sep 28 2017 10:30:11 UTC
10-Oct-2017 02:28:13.808 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.5.23.0
10-Oct-2017 02:28:13.808 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
10-Oct-2017 02:28:13.808 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 3.10.0-123.el7.x86_64
10-Oct-2017 02:28:13.809 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
10-Oct-2017 02:28:13.809 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /root/Desktop/jdk1.8.0_144/jre
10-Oct-2017 02:28:13.809 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_144-b01
10-Oct-2017 02:28:13.809 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
10-Oct-2017 02:28:13.810 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /root/Desktop/tomcat/apache-tomcat-8.5.23
10-Oct-2017 02:28:13.810 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /root/Desktop/tomcat/apache-tomcat-8.5.23
10-Oct-2017 02:28:13.810 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/root/Desktop/tomcat/apache-tomcat-8.5.23/conf/logging.properties
10-Oct-2017 02:28:13.811 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
10-Oct-2017 02:28:13.811 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
10-Oct-2017 02:28:13.811 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
10-Oct-2017 02:28:13.811 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/root/Desktop/tomcat/apache-tomcat-8.5.23
10-Oct-2017 02:28:13.811 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/root/Desktop/tomcat/apache-tomcat-8.5.23
10-Oct-2017 02:28:13.812 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/root/Desktop/tomcat/apache-tomcat-8.5.23/temp
10-Oct-2017 02:28:13.812 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]
10-Oct-2017 02:28:15.306 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8081"]
10-Oct-2017 02:28:15.518 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
10-Oct-2017 02:28:15.551 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
10-Oct-2017 02:28:15.558 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
10-Oct-2017 02:28:15.568 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 4756 ms
10-Oct-2017 02:28:15.869 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
10-Oct-2017 02:28:15.870 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.23
10-Oct-2017 02:28:16.072 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/root/Desktop/tomcat/apache-tomcat-8.5.23/webapps/ROOT]
10-Oct-2017 02:28:18.435 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/root/Desktop/tomcat/apache-tomcat-8.5.23/webapps/ROOT] has finished in [2,362] ms
10-Oct-2017 02:28:18.436 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/root/Desktop/tomcat/apache-tomcat-8.5.23/webapps/docs]
10-Oct-2017 02:28:18.540 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/root/Desktop/tomcat/apache-tomcat-8.5.23/webapps/docs] has finished in [89] ms
10-Oct-2017 02:28:18.541 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/root/Desktop/tomcat/apache-tomcat-8.5.23/webapps/examples]
10-Oct-2017 02:28:20.151 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/root/Desktop/tomcat/apache-tomcat-8.5.23/webapps/examples] has finished in [1,611] ms
10-Oct-2017 02:28:20.152 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/root/Desktop/tomcat/apache-tomcat-8.5.23/webapps/host-manager]
10-Oct-2017 02:28:20.320 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/root/Desktop/tomcat/apache-tomcat-8.5.23/webapps/host-manager] has finished in [168] ms
10-Oct-2017 02:28:20.321 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/root/Desktop/tomcat/apache-tomcat-8.5.23/webapps/manager]
10-Oct-2017 02:28:20.438 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/root/Desktop/tomcat/apache-tomcat-8.5.23/webapps/manager] has finished in [117] ms
10-Oct-2017 02:28:20.461 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8081"]
10-Oct-2017 02:28:20.540 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
10-Oct-2017 02:28:20.547 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 4978 ms
^C10-Oct-2017 02:29:29.604 INFO [Thread-5] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8081"]
10-Oct-2017 02:29:29.695 INFO [Thread-5] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
10-Oct-2017 02:29:29.748 INFO [Thread-5] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
10-Oct-2017 02:29:30.063 INFO [Thread-5] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8081"]
10-Oct-2017 02:29:30.069 INFO [Thread-5] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
10-Oct-2017 02:29:30.077 INFO [Thread-5] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8081"]
10-Oct-2017 02:29:30.094 INFO [Thread-5] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"]
[root#localhost bin]# ./startup.sh
Using CATALINA_BASE: /root/Desktop/tomcat/apache-tomcat-8.5.23
Using CATALINA_HOME: /root/Desktop/tomcat/apache-tomcat-8.5.23
Using CATALINA_TMPDIR: /root/Desktop/tomcat/apache-tomcat-8.5.23/temp
Using JRE_HOME: /root/Desktop/jdk1.8.0_144/jre
Using CLASSPATH: /root/Desktop/tomcat/apache-tomcat-8.5.23/bin/bootstrap.jar:/root/Desktop/tomcat/apache-tomcat-8.5.23/bin/tomcat-juli.jar
Tomcat started.
then again try to shutdown
from /bin# ./shutdown
[root#localhost bin]# ./shutdown.sh
Using CATALINA_BASE: /root/Desktop/tomcat/apache-tomcat-8.5.23
Using CATALINA_HOME: /root/Desktop/tomcat/apache-tomcat-8.5.23
Using CATALINA_TMPDIR: /root/Desktop/tomcat/apache-tomcat-8.5.23/temp
Using JRE_HOME: /root/Desktop/jdk1.8.0_144/jre
Using CLASSPATH: /root/Desktop/tomcat/apache-tomcat-8.5.23/bin/bootstrap.jar:/root/Desktop/tomcat/apache-tomcat-8.5.23/bin/tomcat-juli.jar
good luck

Threads are going to be renewed over time to try and avoid a probable memory leak

I try to deploy my war file.
But after success deployment.
I get this log:
[root#dfdfdf bin]# export JAVA_HOME="/usr/java/jdk1.8.0_112/"
[root#dfdfdfdbin]# ./startup.sh
Using CATALINA_BASE: /root/apache-tomcat-8.5.8
Using CATALINA_HOME: /root/apache-tomcat-8.5.8
Using CATALINA_TMPDIR: /root/apache-tomcat-8.5.8/temp
Using JRE_HOME: /usr/java/jdk1.8.0_112/
Using CLASSPATH: /root/apache-tomcat-8.5.8/bin/bootstrap.jar:/root/apache-tomcat-8.5.8/bin/tomcat-juli.jar
Tomcat started.
[root#satubangau bin]# tail -f ../logs/catalina.out
06-Feb-2017 07:21:27.881 SEVERE [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [org.springframework.core.NamedThreadLocal] (value [Request attributes]) and a value of type [org.grails.web.servlet.mvc.GrailsWebRequest] (value [ServletWebRequest: uri=/error]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
06-Feb-2017 07:21:27.986 INFO [Thread-17] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-80"]
06-Feb-2017 07:21:27.988 INFO [Thread-17] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["https-jsse-nio-443"]
06-Feb-2017 07:21:27.994 INFO [Thread-17] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
06-Feb-2017 07:21:27.995 INFO [Thread-17] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-80"]
06-Feb-2017 07:21:27.996 INFO [Thread-17] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["https-jsse-nio-443"]
06-Feb-2017 07:21:27.997 INFO [Thread-17] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"]
/root/apache-tomcat-8.5.8/bin/catalina.sh: line 434: /usr/java/jdk1.8.0_111/bin/java: No such file or directory
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=256m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
06-Feb-2017 07:54:26.688 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.5.8
06-Feb-2017 07:54:26.691 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Nov 3 2016 21:14:13 UTC
06-Feb-2017 07:54:26.692 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.5.8.0
06-Feb-2017 07:54:26.692 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
06-Feb-2017 07:54:26.694 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.0.4-042stab120.16
06-Feb-2017 07:54:26.694 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
06-Feb-2017 07:54:26.694 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/java/jdk1.8.0_112/jre
06-Feb-2017 07:54:26.695 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_112-b15
06-Feb-2017 07:54:26.695 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
06-Feb-2017 07:54:26.695 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /root/apache-tomcat-8.5.8
06-Feb-2017 07:54:26.696 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /root/apache-tomcat-8.5.8
06-Feb-2017 07:54:26.697 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/root/apache-tomcat-8.5.8/conf/logging.properties
06-Feb-2017 07:54:26.697 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
06-Feb-2017 07:54:26.698 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
06-Feb-2017 07:54:26.699 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
06-Feb-2017 07:54:26.700 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms256m
06-Feb-2017 07:54:26.700 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx512M
06-Feb-2017 07:54:26.700 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:PermSize=256m
06-Feb-2017 07:54:26.701 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxPermSize=256m
06-Feb-2017 07:54:26.701 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:-UseGCOverheadLimit
06-Feb-2017 07:54:26.703 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:-PrintGCDetails
06-Feb-2017 07:54:26.703 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true
06-Feb-2017 07:54:26.703 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dfile.encoding=UTF-8
06-Feb-2017 07:54:26.703 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/root/apache-tomcat-8.5.8
06-Feb-2017 07:54:26.777 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/root/apache-tomcat-8.5.8
06-Feb-2017 07:54:26.777 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/root/apache-tomcat-8.5.8/temp
06-Feb-2017 07:54:26.777 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
06-Feb-2017 07:54:27.777 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-80"]
06-Feb-2017 07:54:27.882 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
06-Feb-2017 07:54:27.887 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["https-jsse-nio-443"]
06-Feb-2017 07:54:29.784 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
06-Feb-2017 07:54:29.790 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
06-Feb-2017 07:54:29.792 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
06-Feb-2017 07:54:29.795 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 6017 ms
06-Feb-2017 07:54:29.986 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
06-Feb-2017 07:54:29.987 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.8
06-Feb-2017 07:54:30.098 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /root/apache-tomcat-8.5.8/webapps/ROOT.war
06-Feb-2017 07:55:07.702 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.
Configuring Spring Security Core ...
... finished configuring Spring Security Core
see this line
06-Feb-2017 07:21:27.881 SEVERE [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [org.springframework.core.NamedThreadLocal] (value [Request attributes]) and a value of type [org.grails.web.servlet.mvc.GrailsWebRequest] (value [ServletWebRequest: uri=/error]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
I don't know why I get this log, but I am using grails 3.1.1 .
I wonder, this message is talking about my Application or server's condition.
I have already faced the same problem, also got solution from Here. This problem occurred in the Application server. However, application server also communicated with memcached server. After observation, got memcached server memory was full. After restart memcached then everything is fine.
If you are using Redis, also can check.

apache tomcat v9.0 server at localhost failed to start

Basically i have a java ee project configured with apache v9.0 and eclipse, based on research i had i found that gmail have a free smtp server that allows us to perform our mail services. now the problem is what when ever i input my smtp mail code to my project for sending a simple mail, apache pops an error saying:
Server Tomcat v9.0 Server at localhost failed to start?
Apache logs:
First file:
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/9.0.0.M9
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Jul 4 2016 18:22:47 UTC
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 9.0.0.0
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 8
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.2
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: x86
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\Program Files (x86)\Java\jre1.8.0_101
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_101-b13
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\temp
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: - Djava.util.logging.config.file=C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\conf\logging.properties
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: exit
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms128m
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx256m
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.2.8 using APR version 1.5.2.
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
02-Sep-2016 09:03:21.548 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.2h 3 May 2016)
02-Sep-2016 09:03:23.095 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-30012"]
02-Sep-2016 09:03:25.548 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
02-Sep-2016 09:03:25.564 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-30013"]
02-Sep-2016 09:03:25.564 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
02-Sep-2016 09:03:25.564 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 8457 ms
02-Sep-2016 09:03:25.814 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
02-Sep-2016 09:03:25.814 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/9.0.0.M9
02-Sep-2016 09:03:25.861 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\docs
02-Sep-2016 09:03:26.548 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\docs has finished in 687 ms
02-Sep-2016 09:03:26.548 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\examples
02-Sep-2016 09:03:28.142 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\examples has finished in 1,594 ms
02-Sep-2016 09:03:28.142 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\host-manager
02-Sep-2016 09:03:28.251 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\host-manager has finished in 109 ms
02-Sep-2016 09:03:28.251 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\manager
02-Sep-2016 09:03:28.267 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\manager has finished in 16 ms
02-Sep-2016 09:03:28.267 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\ROOT
02-Sep-2016 09:03:28.314 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\ROOT has finished in 47 ms
02-Sep-2016 09:03:28.314 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [http-nio-30012]
02-Sep-2016 09:03:28.439 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [ajp-nio-30013]
02-Sep-2016 09:03:28.454 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 2888
Second File:
[2016-09-02 09:03:11] [info] [ 3436] Commons Daemon procrun (1.0.15.0 32-bit) started
[2016-09-02 09:03:11] [info] [ 3436] Running 'Tomcat9' Service...
[2016-09-02 09:03:12] [info] [ 3468] Starting service...
[2016-09-02 09:03:17] [info] [ 3468] Service started in 5035 ms.
Third File:
02-Sep-2016 09:03:28.095 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
02-Sep-2016 09:03:28.095 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
Fourth File:
2016-09-02 09:03:11 Commons Daemon procrun stderr initialized
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/9.0.0.M9
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Jul 4 2016 18:22:47 UTC
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 9.0.0.0
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 8
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.2
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: x86
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\Program Files (x86)\Java\jre1.8.0_101
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_101-b13
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\temp
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\conf\logging.properties
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: exit
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms128m
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx256m
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.2.8 using APR version 1.5.2.
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
02-Sep-2016 09:03:21.045 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
02-Sep-2016 09:03:21.548 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.2h 3 May 2016)
02-Sep-2016 09:03:23.095 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-30012"]
02-Sep-2016 09:03:25.548 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
02-Sep-2016 09:03:25.564 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-30013"]
02-Sep-2016 09:03:25.564 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
02-Sep-2016 09:03:25.564 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 8457 ms
02-Sep-2016 09:03:25.814 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
02-Sep-2016 09:03:25.814 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/9.0.0.M9
02-Sep-2016 09:03:25.861 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\docs
02-Sep-2016 09:03:26.548 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\docs has finished in 687 ms
02-Sep-2016 09:03:26.548 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\examples
02-Sep-2016 09:03:28.142 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\examples has finished in 1,594 ms
02-Sep-2016 09:03:28.142 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\host-manager
02-Sep-2016 09:03:28.251 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\host-manager has finished in 109 ms
02-Sep-2016 09:03:28.251 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\manager
02-Sep-2016 09:03:28.267 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\manager has finished in 16 ms
02-Sep-2016 09:03:28.267 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\ROOT
02-Sep-2016 09:03:28.314 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\ROOT has finished in 47 ms
02-Sep-2016 09:03:28.314 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [http-nio-30012]
02-Sep-2016 09:03:28.439 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [ajp-nio-30013]
02-Sep-2016 09:03:28.454 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 2888 ms
Last File Log:
2016-09-02 09:03:11 Commons Daemon procrun stdout initialized
here is my smtp implementation code:
package duck.reg.pack;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import java.util.Properties;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
#WebServlet("/sendmailtls")
public class SendMailTLS extends HttpServlet {
public static void main() {
final String username = "hello#gmail.com";
final String password = "MYPassword";
Properties props = new Properties();
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.starttls.enable", "true");
props.put("mail.smtp.host", "smtp.gmail.com");
props.put("mail.smtp.port", "587");
Session session = Session.getInstance(props,
new javax.mail.Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
try {
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress("myemail#gmail.com"));
message.setRecipients(Message.RecipientType.TO,
InternetAddress.parse("myemail#yahoo.com"));
message.setSubject("Testing Subject");
message.setText("Dear Mail Crawler,"
+ "\n\n No spam to my email, please!");
Transport.send(message);
System.out.println("Done");
} catch (MessagingException e) {
throw new RuntimeException(e);
}
}
}
My Web.xml File:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
<display-name>Duck</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>

Intellij IDEA 14 and Tomcat 8.0

I'm newbie in web development with Java and try to run my first "Hello World" app on Intellij 14 + Tomcat 8.0. Every time I got error "404".
Tomcat without Intellij work perfectly on http://localhost:8080/ as Windows 7 service.
My web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
</web-app>
My index.xhtml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<f:view>
<h:outputLabel value="Hello, world"/>
</f:view>
</html>
Configuration of Tomcat 8:
Debug configuration
Catalina.log:
09-Nov-2015 08:11:12.741 WARNING [main] org.apache.catalina.core.StandardServer.await StandardServer.await: Invalid command '' received
09-Nov-2015 08:11:15.890 WARNING [main] org.apache.catalina.core.StandardServer.await StandardServer.await: Invalid command '' received
09-Nov-2015 08:11:24.473 INFO [Thread-6] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
09-Nov-2015 08:11:24.674 INFO [Thread-6] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
09-Nov-2015 08:11:24.725 INFO [Thread-6] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
09-Nov-2015 08:11:24.959 INFO [Thread-6] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
09-Nov-2015 08:11:25.012 INFO [Thread-6] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
09-Nov-2015 09:12:48.990 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.28
09-Nov-2015 09:12:48.997 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Oct 7 2015 18:25:21 UTC
09-Nov-2015 09:12:48.997 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.28.0
09-Nov-2015 09:12:48.997 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 7
09-Nov-2015 09:12:48.997 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.1
09-Nov-2015 09:12:48.998 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
09-Nov-2015 09:12:48.998 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\Program Files\Java\jre1.8.0_65
09-Nov-2015 09:12:48.998 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_65-b17
09-Nov-2015 09:12:48.998 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
09-Nov-2015 09:12:48.999 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Program Files\Apache Software Foundation\Tomcat 8.0
09-Nov-2015 09:12:48.999 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\Program Files\Apache Software Foundation\Tomcat 8.0
09-Nov-2015 09:12:48.999 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 8.0
09-Nov-2015 09:12:48.999 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 8.0
09-Nov-2015 09:12:49.000 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 8.0\endorsed
09-Nov-2015 09:12:49.000 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 8.0\temp
09-Nov-2015 09:12:49.000 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
09-Nov-2015 09:12:49.000 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Tomcat 8.0\conf\logging.properties
09-Nov-2015 09:12:49.000 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: exit
09-Nov-2015 09:12:49.000 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms128m
09-Nov-2015 09:12:49.000 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx256m
09-Nov-2015 09:12:49.001 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: C:\Program Files\Apache Software Foundation\Tomcat 8.0\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\Java\jre1.8.0_60\bin;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5\;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5\Doctrine extensions for PHP\;;.
09-Nov-2015 09:12:50.595 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
09-Nov-2015 09:12:51.071 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
09-Nov-2015 09:12:51.073 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
09-Nov-2015 09:12:51.076 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
09-Nov-2015 09:12:51.076 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 4183 ms
09-Nov-2015 09:12:51.156 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
09-Nov-2015 09:12:51.156 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.28
09-Nov-2015 09:12:51.190 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\docs
09-Nov-2015 09:12:52.137 INFO [localhost-startStop-1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [251] milliseconds.
09-Nov-2015 09:12:52.163 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\docs has finished in 973 ms
09-Nov-2015 09:12:52.163 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\manager
09-Nov-2015 09:12:52.217 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\manager has finished in 54 ms
09-Nov-2015 09:12:52.217 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\ROOT
09-Nov-2015 09:12:52.265 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\ROOT has finished in 48 ms
09-Nov-2015 09:12:52.272 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
09-Nov-2015 09:12:52.282 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
09-Nov-2015 09:12:52.285 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 1209 ms
09-Nov-2015 09:15:07.235 INFO [Thread-6] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
09-Nov-2015 09:15:07.247 INFO [Thread-6] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
09-Nov-2015 09:15:07.298 INFO [Thread-6] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
09-Nov-2015 09:15:07.355 INFO [Thread-6] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
09-Nov-2015 09:15:07.358 INFO [Thread-6] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
09-Nov-2015 10:08:14.705 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.28
09-Nov-2015 10:08:14.707 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Oct 7 2015 18:25:21 UTC
09-Nov-2015 10:08:14.707 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.28.0
09-Nov-2015 10:08:14.708 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 7
09-Nov-2015 10:08:14.708 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.1
09-Nov-2015 10:08:14.708 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
09-Nov-2015 10:08:14.708 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\Program Files\Java\jre1.8.0_65
09-Nov-2015 10:08:14.708 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_65-b17
09-Nov-2015 10:08:14.708 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
09-Nov-2015 10:08:14.709 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Program Files\Apache Software Foundation\Tomcat 8.0
09-Nov-2015 10:08:14.709 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\Program Files\Apache Software Foundation\Tomcat 8.0
09-Nov-2015 10:08:14.709 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 8.0
09-Nov-2015 10:08:14.709 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 8.0
09-Nov-2015 10:08:14.709 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 8.0\endorsed
09-Nov-2015 10:08:14.710 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 8.0\temp
09-Nov-2015 10:08:14.710 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
09-Nov-2015 10:08:14.710 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Tomcat 8.0\conf\logging.properties
09-Nov-2015 10:08:14.710 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: exit
09-Nov-2015 10:08:14.710 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms128m
09-Nov-2015 10:08:14.711 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx256m
09-Nov-2015 10:08:14.711 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: C:\Program Files\Apache Software Foundation\Tomcat 8.0\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\Java\jre1.8.0_60\bin;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5\;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5\Doctrine extensions for PHP\;;.
09-Nov-2015 10:08:14.884 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
09-Nov-2015 10:08:14.972 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
09-Nov-2015 10:08:14.974 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
09-Nov-2015 10:08:14.977 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
09-Nov-2015 10:08:14.977 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 725 ms
09-Nov-2015 10:08:15.002 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
09-Nov-2015 10:08:15.002 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.28
09-Nov-2015 10:08:15.011 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\docs
09-Nov-2015 10:08:15.482 INFO [localhost-startStop-1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [130] milliseconds.
09-Nov-2015 10:08:15.500 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\docs has finished in 489 ms
09-Nov-2015 10:08:15.500 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\manager
09-Nov-2015 10:08:15.579 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\manager has finished in 79 ms
09-Nov-2015 10:08:15.579 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\ROOT
09-Nov-2015 10:08:15.609 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\ROOT has finished in 30 ms
09-Nov-2015 10:08:15.621 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
09-Nov-2015 10:08:15.632 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
09-Nov-2015 10:08:15.634 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 656 ms
09-Nov-2015 10:08:33.224 INFO [Thread-6] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
09-Nov-2015 10:08:33.227 INFO [Thread-6] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
09-Nov-2015 10:08:33.278 INFO [Thread-6] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
09-Nov-2015 10:08:33.313 INFO [Thread-6] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
09-Nov-2015 10:08:33.317 INFO [Thread-6] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
According to your Deployment screenshot tab, you have to fix value of the field Open browser on tab Server to value http://localhost:8080/JSFDemo and use this path to work with your web-application run from IDEA.

Categories

Resources