netbeans - Tomcat web application deployment failed - java

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.

Related

Tomcat: change port from 8080 to 80 not working

I have a tomcat server running on DigitalOcean VPS. The server.xml file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
<GlobalNamingResources>
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<Service name="Catalina">
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
<Engine name="Catalina" defaultHost="localhost">
<Realm className="org.apache.catalina.realm.LockOutRealm">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
</Realm>
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
</Host>
</Engine>
</Service>
</Server>
I edited the <Connector> part to make the server run on port 80 instead of 8080. Before the changes I could access the server using IP:8080 address, but now I can't access it at all - whether I use IP:8080 or IP:80 or IP.
I restarted my tomcat using shutdown.sh and startup.sh and restarted my droplet using sudo reboot, but it changed nothing.
I checked the firewall using sudo ufw status verbose and it gave an inactive status.
EDIT:
I tried the shutdown.sh -> startup.sh -> sudo reboot route again and here is the catalina.out since the shutdown.sh command:
28-Oct-2018 11:40:10.377 INFO [main] org.apache.catalina.core.StandardServer.await A valid shutdown command was received via the shutdown port. Stopping the Server instance.
28-Oct-2018 11:40:10.378 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-80"]
28-Oct-2018 11:40:10.380 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
28-Oct-2018 11:40:10.442 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
28-Oct-2018 11:40:10.494 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
28-Oct-2018 11:40:10.495 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-80"]
28-Oct-2018 11:40:10.498 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-80"]
28-Oct-2018 11:40:10.498 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"]
28-Oct-2018 11:40:14.691 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/9.0.12
28-Oct-2018 11:40:14.697 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Sep 4 2018 22:13:41 UTC
28-Oct-2018 11:40:14.698 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 9.0.12.0
28-Oct-2018 11:40:14.698 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
28-Oct-2018 11:40:14.698 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.4.0-138-generic
28-Oct-2018 11:40:14.698 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
28-Oct-2018 11:40:14.698 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-8-openjdk-amd64/jre
28-Oct-2018 11:40:14.706 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_181-8u181-b13-0ubuntu0.16.04.1-b13
28-Oct-2018 11:40:14.706 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
28-Oct-2018 11:40:14.706 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /opt/tomcat
28-Oct-2018 11:40:14.706 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /opt/tomcat
28-Oct-2018 11:40:14.707 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties
28-Oct-2018 11:40:14.707 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
28-Oct-2018 11:40:14.707 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
28-Oct-2018 11:40:14.708 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
28-Oct-2018 11:40:14.708 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
28-Oct-2018 11:40:14.708 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
28-Oct-2018 11:40:14.708 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/tomcat
28-Oct-2018 11:40:14.709 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/tomcat
28-Oct-2018 11:40:14.709 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/tomcat/temp
28-Oct-2018 11:40:14.709 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/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib]
28-Oct-2018 11:40:14.857 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-80"]
28-Oct-2018 11:40:14.887 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
28-Oct-2018 11:40:14.900 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
28-Oct-2018 11:40:14.907 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
28-Oct-2018 11:40:14.908 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 896 ms
28-Oct-2018 11:40:14.958 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
28-Oct-2018 11:40:14.962 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/9.0.12
28-Oct-2018 11:40:14.980 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/docs]
java.util.logging.ErrorManager: 4
java.io.FileNotFoundException: /opt/tomcat/logs/manager.2018-10-28.log (Permission denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at org.apache.juli.FileHandler.openWriter(FileHandler.java:495)
at org.apache.juli.FileHandler.<init>(FileHandler.java:168)
at org.apache.juli.AsyncFileHandler.<init>(AsyncFileHandler.java:82)
at org.apache.juli.AsyncFileHandler.<init>(AsyncFileHandler.java:74)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:602)
at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:538)
at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:336)
at java.util.logging.LogManager$3.run(LogManager.java:399)
at java.util.logging.LogManager$3.run(LogManager.java:396)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.readPrimordialConfiguration(LogManager.java:396)
at java.util.logging.LogManager.access$800(LogManager.java:145)
at java.util.logging.LogManager$2.run(LogManager.java:345)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.ensureLogManagerInitialized(LogManager.java:338)
at java.util.logging.LogManager.getLogManager(LogManager.java:378)
at java.util.logging.Logger.demandLogger(Logger.java:448)
at java.util.logging.Logger.getLogger(Logger.java:502)
at org.apache.juli.logging.DirectJDKLog.<init>(DirectJDKLog.java:61)
at org.apache.juli.logging.DirectJDKLog.getInstance(DirectJDKLog.java:181)
at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:116)
at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:139)
at org.apache.juli.logging.LogFactory.getLog(LogFactory.java:194)
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:52)
java.util.logging.ErrorManager: 4
java.io.FileNotFoundException: /opt/tomcat/logs/host-manager.2018-10-28.log (Permission denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at org.apache.juli.FileHandler.openWriter(FileHandler.java:495)
at org.apache.juli.FileHandler.<init>(FileHandler.java:168)
at org.apache.juli.AsyncFileHandler.<init>(AsyncFileHandler.java:82)
at org.apache.juli.AsyncFileHandler.<init>(AsyncFileHandler.java:74)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:602)
at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:538)
at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:336)
at java.util.logging.LogManager$3.run(LogManager.java:399)
at java.util.logging.LogManager$3.run(LogManager.java:396)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.readPrimordialConfiguration(LogManager.java:396)
at java.util.logging.LogManager.access$800(LogManager.java:145)
at java.util.logging.LogManager$2.run(LogManager.java:345)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.ensureLogManagerInitialized(LogManager.java:338)
at java.util.logging.LogManager.getLogManager(LogManager.java:378)
at java.util.logging.Logger.demandLogger(Logger.java:448)
at java.util.logging.Logger.getLogger(Logger.java:502)
at org.apache.juli.logging.DirectJDKLog.<init>(DirectJDKLog.java:61)
at org.apache.juli.logging.DirectJDKLog.getInstance(DirectJDKLog.java:181)
at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:116)
at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:139)
at org.apache.juli.logging.LogFactory.getLog(LogFactory.java:194)
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:52)
28-Oct-2018 11:40:31.547 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/9.0.12
28-Oct-2018 11:40:31.552 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Sep 4 2018 22:13:41 UTC
28-Oct-2018 11:40:31.552 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 9.0.12.0
28-Oct-2018 11:40:31.552 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
28-Oct-2018 11:40:31.552 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.4.0-138-generic
28-Oct-2018 11:40:31.553 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
28-Oct-2018 11:40:31.553 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-8-openjdk-amd64/jre
28-Oct-2018 11:40:31.553 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_181-8u181-b13-0ubuntu0.16.04.1-b13
28-Oct-2018 11:40:31.553 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
28-Oct-2018 11:40:31.553 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /opt/tomcat
28-Oct-2018 11:40:31.553 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /opt/tomcat
28-Oct-2018 11:40:31.553 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties
28-Oct-2018 11:40:31.559 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
28-Oct-2018 11:40:31.559 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true
28-Oct-2018 11:40:31.559 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.security.egd=file:/dev/./urandom
28-Oct-2018 11:40:31.560 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
28-Oct-2018 11:40:31.560 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
28-Oct-2018 11:40:31.560 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
28-Oct-2018 11:40:31.561 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms512M
28-Oct-2018 11:40:31.561 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx600M
28-Oct-2018 11:40:31.561 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseParallelGC
28-Oct-2018 11:40:31.561 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
28-Oct-2018 11:40:31.562 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/tomcat
28-Oct-2018 11:40:31.562 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/tomcat
28-Oct-2018 11:40:31.563 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/tomcat/temp
28-Oct-2018 11:40:31.563 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/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib]
28-Oct-2018 11:40:31.727 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-80"]
28-Oct-2018 11:40:31.751 SEVERE [main] org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to initialize component [Connector[HTTP/1.1-80]]
org.apache.catalina.LifecycleException: Protocol handler initialization failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:935)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:533)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:852)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.startup.Catalina.load(Catalina.java:633)
at org.apache.catalina.startup.Catalina.load(Catalina.java:656)
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.load(Bootstrap.java:306)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:491)
Caused by: java.net.SocketException: Permission denied
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.apache.tomcat.util.net.NioEndpoint.initServerSocket(NioEndpoint.java:236)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:210)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1044)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:540)
at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:74)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:932)
... 13 more
28-Oct-2018 11:40:31.753 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
28-Oct-2018 11:40:31.765 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
28-Oct-2018 11:40:31.788 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1791 ms
28-Oct-2018 11:40:31.843 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
28-Oct-2018 11:40:31.844 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/9.0.12
28-Oct-2018 11:40:31.852 SEVERE [main] org.apache.catalina.startup.HostConfig.beforeStart Unable to create directory for deployment: [/opt/tomcat/conf/Catalina/localhost]
28-Oct-2018 11:40:31.858 SEVERE [main] org.apache.catalina.valves.AccessLogValve.open Failed to open access log file [/opt/tomcat/logs/localhost_access_log.2018-10-28.txt]
java.io.FileNotFoundException: /opt/tomcat/logs/localhost_access_log.2018-10-28.txt (Permission denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at org.apache.catalina.valves.AccessLogValve.open(AccessLogValve.java:651)
at org.apache.catalina.valves.AccessLogValve.startInternal(AccessLogValve.java:685)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardPipeline.startInternal(StandardPipeline.java:179)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:965)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
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:350)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
28-Oct-2018 11:40:31.863 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/docs]
28-Oct-2018 11:40:32.472 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/docs] has finished in [608] ms
28-Oct-2018 11:40:32.472 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/host-manager]
28-Oct-2018 11:40:32.543 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/host-manager] has finished in [70] ms
28-Oct-2018 11:40:32.544 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/manager]
28-Oct-2018 11:40:32.590 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/manager] has finished in [46] ms
28-Oct-2018 11:40:32.595 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/Test]
28-Oct-2018 11:40:32.644 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/Test] has finished in [50] ms
28-Oct-2018 11:40:32.645 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/RedditDesk]
28-Oct-2018 11:40:32.681 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/RedditDesk] has finished in [36] ms
28-Oct-2018 11:40:32.681 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/ROOT]
28-Oct-2018 11:40:32.723 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/ROOT] has finished in [42] ms
28-Oct-2018 11:40:32.724 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/examples]
28-Oct-2018 11:40:33.158 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/examples] has finished in [434] ms
28-Oct-2018 11:40:33.165 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
28-Oct-2018 11:40:33.196 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 1408 ms
With help of #ernest_k I managed to find the problem. The problem was that the port was never truly changed from 8080 to 80. It happened because although I was connected as a root user to the VPS, the tomcat automatically switched to non-root user tomcat, because of /etc/systemd/system/tomcat.service file:
[Unit]
Description=Apache Tomcat Web Application Container
After=network.target
[Service]
Type=forking
Environment=JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid
Environment=CATALINA_HOME=/opt/tomcat
Environment=CATALINA_BASE=/opt/tomcat
Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC'
Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'
ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/opt/tomcat/bin/shutdown.sh
User=tomcat
Group=tomcat
UMask=0007
RestartSec=10
Restart=always
[Install]
WantedBy=multi-user.target
So I changed a User=tomcat to User=root, restarted everything and now it works fine!
port no 1 to 1023 is reserved for the system use may be because of that you are not able to change the port no to 80.

Getting exception while deploying adf application in Apache tomcat server

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)

War exploded: Error during artifact deployment. Tomcat 8.5+IDEA

I'm trying to configure Tomcat 8.5 on Intellij Idea Ultimate.
I installed it in /opt/tomcat/apache-tomcat-8.5.11. I'm using Ubuntu.
When I run the project I have these output:
`/opt/tomcat/apache-tomcat-8.5.11/bin/catalina.sh run
[2017-02-05 02:40:12,566] Artifact Spring1:war exploded: Server is not connected. Deploy is not available.
05-Feb-2017 14:40:13.144 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.5.11
05-Feb-2017 14:40:13.146 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Jan 10 2017 21:02:52 UTC
05-Feb-2017 14:40:13.147 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.5.11.0
05-Feb-2017 14:40:13.147 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
05-Feb-2017 14:40:13.147 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.4.0-62-generic
05-Feb-2017 14:40:13.147 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
05-Feb-2017 14:40:13.147 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-8-oracle/jre
05-Feb-2017 14:40:13.147 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_121-b13
05-Feb-2017 14:40:13.147 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
05-Feb-2017 14:40:13.147 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /home/marcel/.IntelliJIdea2016.3/system/tomcat/Unnamed_Spring1
05-Feb-2017 14:40:13.147 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /opt/tomcat/apache-tomcat-8.5.11
05-Feb-2017 14:40:13.147 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/home/marcel/.IntelliJIdea2016.3/system/tomcat/Unnamed_Spring1/conf/logging.properties
05-Feb-2017 14:40:13.148 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
05-Feb-2017 14:40:13.148 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
05-Feb-2017 14:40:13.148 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
05-Feb-2017 14:40:13.148 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
05-Feb-2017 14:40:13.148 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
05-Feb-2017 14:40:13.148 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
05-Feb-2017 14:40:13.150 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
05-Feb-2017 14:40:13.151 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
05-Feb-2017 14:40:13.151 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/home/marcel/.IntelliJIdea2016.3/system/tomcat/Unnamed_Spring1
05-Feb-2017 14:40:13.151 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/tomcat/apache-tomcat-8.5.11
05-Feb-2017 14:40:13.151 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/tomcat/apache-tomcat-8.5.11/temp
05-Feb-2017 14:40:13.151 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: /home/marcel/.local/share/umake/ide/idea-ultimate/bin::/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
05-Feb-2017 14:40:13.270 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
05-Feb-2017 14:40:13.284 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
05-Feb-2017 14:40:13.286 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
05-Feb-2017 14:40:13.287 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
05-Feb-2017 14:40:13.287 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 415 ms
05-Feb-2017 14:40:13.321 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
05-Feb-2017 14:40:13.321 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.11
05-Feb-2017 14:40:13.328 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [http-nio-8080]
05-Feb-2017 14:40:13.333 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [ajp-nio-8009]
05-Feb-2017 14:40:13.334 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 46 ms
Connected to server
[2017-02-05 02:40:13,677] Artifact Spring1:war exploded: Artifact is being deployed, please wait...
05-Feb-2017 14:40:13.940 SEVERE [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
05-Feb-2017 14:40:13.950 SEVERE [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
[2017-02-05 02:40:13,964] Artifact Spring1:war exploded: Error during artifact deployment. See server log for details.
05-Feb-2017 14:40:23.329 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/apache-tomcat-8.5.11/webapps/host-manager
05-Feb-2017 14:40:23.388 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/apache-tomcat-8.5.11/webapps/host-manager has finished in 58 ms
05-Feb-2017 14:40:23.388 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/apache-tomcat-8.5.11/webapps/examples
05-Feb-2017 14:40:23.609 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/apache-tomcat-8.5.11/webapps/examples has finished in 221 ms
05-Feb-2017 14:40:23.610 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/apache-tomcat-8.5.11/webapps/docs
05-Feb-2017 14:40:23.624 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/apache-tomcat-8.5.11/webapps/docs has finished in 15 ms
05-Feb-2017 14:40:23.624 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/apache-tomcat-8.5.11/webapps/manager
05-Feb-2017 14:40:23.641 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/apache-tomcat-8.5.11/webapps/manager has finished in 17 ms
`
I'm using the following configuration in IDEA :
http://imgur.com/nYT2i7T
http://imgur.com/PgGfmh2
I tried to follow Tomcat in Idea. war exploded: Server is not connected. Deploy is not available but Tomcat 8.5 bin there's no setenv.sh .
Thanks for help.

One or more listeners failed to start - tomcat8

i am trying to deploy my war file to tomcat 8..
i get this error..
Configuring Spring Security Core ...
... finished configuring Spring Security Core
27-Nov-2015 12:05:30.872 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
27-Nov-2015 12:05:30.899 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
27-Nov-2015 12:05:31.950 SEVERE [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [org.grails.web.converters.configuration.ConvertersConfigurationHolder$2] (value [org.grails.web.converters.configuration.ConvertersConfigurationHolder$2#3452ee75]) and a value of type [java.util.HashMap] (value [{}]) 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.
27-Nov-2015 12:05:31.955 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive /root/apache-tomcat-8.0.28/webapps/ROOT.war has finished in 95,296 ms
27-Nov-2015 12:05:31.958 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-80"]
27-Nov-2015 12:05:31.964 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
27-Nov-2015 12:05:31.968 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 95506 ms
i am using java 1.7.0_75, tomcat 8.0.28
this is my setenv.sh
CATALINA_OPTS="-server -d64 -Xms512m -Xmx512m -XX:PermSize=1024m -XX:MaxPermSize=1024m -XX:-UseGCOverheadLimit -XX:-PrintGCDetails -Djava.awt.headless=true -Dfile.encoding=UTF-8"
export CATALINA_OPTS
anyone know why i get this error?
i build a war with grails 3.0.9
================================================================
when i start tomcat.. i just get this log in /logs/catalina.out
27-Nov-2015 12:03:55.984 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.28
27-Nov-2015 12:03:55.994 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Oct 7 2015 18:25:21 UTC
27-Nov-2015 12:03:55.994 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.28.0
27-Nov-2015 12:03:55.994 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
27-Nov-2015 12:03:55.995 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 3.7.2-042stab092.2
27-Nov-2015 12:03:55.995 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
27-Nov-2015 12:03:55.995 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/java/jdk1.7.0_79/jre
27-Nov-2015 12:03:55.996 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.7.0_79-b15
27-Nov-2015 12:03:55.996 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
27-Nov-2015 12:03:55.996 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /root/apache-tomcat-8.0.28
27-Nov-2015 12:03:55.996 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /root/apache-tomcat-8.0.28
27-Nov-2015 12:03:55.997 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/root/apache-tomcat-8.0.28/conf/logging.properties
27-Nov-2015 12:03:55.998 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
27-Nov-2015 12:03:55.998 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms1024m
27-Nov-2015 12:03:55.998 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx1024m
27-Nov-2015 12:03:55.998 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:PermSize=1024m
27-Nov-2015 12:03:55.999 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxPermSize=1024m
27-Nov-2015 12:03:55.999 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms780m
27-Nov-2015 12:03:56.003 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx780m
27-Nov-2015 12:03:56.003 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:PermSize=1024m
27-Nov-2015 12:03:56.004 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxPermSize=1024m
27-Nov-2015 12:03:56.004 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:-UseGCOverheadLimit
27-Nov-2015 12:03:56.004 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:-PrintGCDetails
27-Nov-2015 12:03:56.004 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true
27-Nov-2015 12:03:56.005 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dfile.encoding=UTF-8
27-Nov-2015 12:03:56.005 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=/root/apache-tomcat-8.0.28/endorsed
27-Nov-2015 12:03:56.005 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/root/apache-tomcat-8.0.28
27-Nov-2015 12:03:56.005 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/root/apache-tomcat-8.0.28
27-Nov-2015 12:03:56.006 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/root/apache-tomcat-8.0.28/temp
27-Nov-2015 12:03:56.006 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
27-Nov-2015 12:03:56.372 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-80"]
27-Nov-2015 12:03:56.438 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
27-Nov-2015 12:03:56.452 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
27-Nov-2015 12:03:56.455 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
27-Nov-2015 12:03:56.461 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1767 ms
27-Nov-2015 12:03:56.550 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
27-Nov-2015 12:03:56.550 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.28
27-Nov-2015 12:03:56.659 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /root/apache-tomcat-8.0.28/webapps/ROOT.war
27-Nov-2015 12:04:07.850 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
anc
Environment.current = PRODUCTION
Environment.DEVELOPMENT = DEVELOPMENT
Environment.current = PRODUCTION
Environment.DEVELOPMENT = DEVELOPMENT
27-Nov-2015 12:05:30.872 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
27-Nov-2015 12:05:30.899 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
27-Nov-2015 12:05:31.950 SEVERE [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [org.grails.web.converters.configuration.ConvertersConfigurationHolder$2] (value [org.grails.web.converters.configuration.ConvertersConfigurationHolder$2#3452ee75]) and a value of type [java.util.HashMap] (value [{}]) 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.
27-Nov-2015 12:05:31.955 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive /root/apache-tomcat-8.0.28/webapps/ROOT.war has finished in 95,296 ms
27-Nov-2015 12:05:31.958 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-80"]
27-Nov-2015 12:05:31.964 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
27-Nov-2015 12:05:31.968 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 95506 ms
after i check...tomcat 8 was failed to run this code
public void contextInitialized(ServletContextEvent event) {
ServletContext servletContext = event.servletContext
final ServerContainer serverContainer = servletContext.getAttribute("javax.websocket.server.ServerContainer")
try {
println "Environment.current = "+Environment.current
if (Environment.current == Environment.PRODUCTION) {
serverContainer.addEndpoint(ServerEndPointDemo) //<<<< this code
println "run 123"
}
println "--- we have a connection"
int defaultMaxSessionIdleTimeout = 900000 //config.timeout ?: 0
serverContainer.defaultMaxSessionIdleTimeout = defaultMaxSessionIdleTimeout
}
catch (IOException e) {
log.error e.message, e
println "e = "+e
}
}
serverContainer.addEndpoint(ServerEndPointDemo) this code was the problem

Tomcat: War file deploys locally but not on online server [duplicate]

This question already has answers here:
java.lang.IllegalArgumentException: The servlets named [X] and [Y] are both mapped to the url-pattern [/url] which is not permitted
(7 answers)
Closed 7 years ago.
I've a war file of a web app that runs on tomcat 8 via netbeans as well as tomcat 8 independently without IDE. But if I try to run the same war file on tomcat 8 installed in an online server(I'm using koding.com vm for the purpose), I'm getting the following log in catalina.out:
19-Oct-2015 04:47:21.458 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.28
19-Oct-2015 04:47:21.459 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Oct 7 2015 18:25:21 UTC
19-Oct-2015 04:47:21.460 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.28.0
19-Oct-2015 04:47:21.460 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
19-Oct-2015 04:47:21.460 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 3.13.0-29-generic
19-Oct-2015 04:47:21.460 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
19-Oct-2015 04:47:21.460 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-7-openjdk-amd64/jre
19-Oct-2015 04:47:21.461 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.7.0_79-b14
19-Oct-2015 04:47:21.461 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
19-Oct-2015 04:47:21.461 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /home/stutech/tomcat
19-Oct-2015 04:47:21.461 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /home/stutech/tomcat
19-Oct-2015 04:47:21.462 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/home/stutech/tomcat/conf/logging.properties
19-Oct-2015 04:47:21.462 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
19-Oct-2015 04:47:21.462 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=/home/stutech/tomcat/endorsed
19-Oct-2015 04:47:21.462 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/home/stutech/tomcat
19-Oct-2015 04:47:21.463 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/home/stutech/tomcat
19-Oct-2015 04:47:21.463 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/home/stutech/tomcat/temp
19-Oct-2015 04:47:21.463 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/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
19-Oct-2015 04:47:21.731 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
19-Oct-2015 04:47:21.782 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
19-Oct-2015 04:47:21.788 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
19-Oct-2015 04:47:21.794 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
19-Oct-2015 04:47:21.796 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1307 ms
19-Oct-2015 04:47:21.871 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
19-Oct-2015 04:47:21.880 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.28
19-Oct-2015 04:47:21.961 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /home/stutech/tomcat/webapps/Whiteboard.war
19-Oct-2015 04:47:21.979 WARNING [localhost-startStop-1] org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting property 'antiJARLocking' to 'true' did not find a matching property.
19-Oct-2015 04:47:23.573 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Whiteboard]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:945)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1798)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: The servlets named [register] and [com.whiteboard.servlet.register] are both mapped to the url-pattern [/register] which is not permitted
at org.apache.tomcat.util.descriptor.web.WebXml.addServletMapping(WebXml.java:308)
at org.apache.catalina.startup.ContextConfig.processAnnotationWebServlet(ContextConfig.java:2342)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2024)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1918)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1913)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1913)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1913)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1139)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:771)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:305)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5080)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 10 more
19-Oct-2015 04:47:23.575 SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive /home/stutech/tomcat/webapps/Whiteboard.war
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Whiteboard]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:729)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:945)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1798)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
19-Oct-2015 04:47:23.584 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive /home/stutech/tomcat/webapps/Whiteboard.war has finished in 1,615 ms
19-Oct-2015 04:47:23.585 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /home/stutech/tomcat/webapps/docs
19-Oct-2015 04:47:23.918 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /home/stutech/tomcat/webapps/docs has finished in 333 ms
19-Oct-2015 04:47:23.922 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /home/stutech/tomcat/webapps/examples
19-Oct-2015 04:47:24.499 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /home/stutech/tomcat/webapps/examples has finished in 577 ms
19-Oct-2015 04:47:24.499 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /home/stutech/tomcat/webapps/host-manager
19-Oct-2015 04:47:24.529 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /home/stutech/tomcat/webapps/host-manager has finished in 30 ms
19-Oct-2015 04:47:24.533 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /home/stutech/tomcat/webapps/ROOT
19-Oct-2015 04:47:24.567 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /home/stutech/tomcat/webapps/ROOT has finished in 33 ms
19-Oct-2015 04:47:24.567 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /home/stutech/tomcat/webapps/manager
19-Oct-2015 04:47:24.626 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /home/stutech/tomcat/webapps/manager has finished in 59 ms
19-Oct-2015 04:47:24.641 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
19-Oct-2015 04:47:24.656 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
19-Oct-2015 04:47:24.660 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 2863 ms
Caused by: java.lang.IllegalArgumentException: The servlets named
[register] and [com.whiteboard.servlet.register] are both mapped to
the url-pattern [/register] which is not permitted
This Error clearly states that same url-mapping is mapped to two Servlets.
Modify your web.xml and you are good to go.

Categories

Resources