I just deployed (first time ever) my Java app based on Spring. On localhost everything worked fine, but after deploy I can’t send any request. Applications just not running on the server.
Logs:
Oct 5 00:23:17 vps-588e7d9b server: Oct 05, 2020 12:23:17 AM org.apache.catalina.startup.HostConfig deployWAR Oct 5 00:23:17 vps-588e7d9b server: INFO: Deploying web application archive /var/lib/tomcat/webapps/TRADESYSTEM.war Oct 5 00:23:17 vps-588e7d9b server: Oct 05, 2020 12:23:17 AM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile Oct 5 00:23:17 vps-588e7d9b server: INFO: validateJarFile(/usr/share/tomcat/webapps/TRADESYSTEM/WEB-INF/lib/tomcat-embed-core-9.0.30.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class Oct 5 00:23:17 vps-588e7d9b server: Oct 05, 2020 12:23:17 AM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile Oct 5 00:23:17 vps-588e7d9b server: INFO: validateJarFile(/usr/share/tomcat/webapps/TRADESYSTEM/WEB-INF/lib/tomcat-embed-el-9.0.30.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/el/Expression.class Oct 5 00:23:20 vps-588e7d9b server: Oct 05, 2020 12:23:20 AM org.apache.catalina.startup.TldConfig execute Oct 5 00:23:20 vps-588e7d9b server: INFO: 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. Oct 5 00:23:20 vps-588e7d9b server: Oct 05, 2020 12:23:20 AM org.apache.catalina.core.ContainerBase addChildInternal Oct 5 00:23:20 vps-588e7d9b server: SEVERE: ContainerBase.addChild: start: Oct 5 00:23:20 vps-588e7d9b server: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/TRADESYSTEM]] Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1092) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:560) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1779) Oct 5 00:23:20 vps-588e7d9b server: at sun.reflect.GeneratedMethodAccessor129.invoke(Unknown Source) Oct 5 00:23:20 vps-588e7d9b server: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) Oct 5 00:23:20 vps-588e7d9b server: at java.lang.reflect.Method.invoke(Method.java:498) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301) Oct 5 00:23:20 vps-588e7d9b server: at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) Oct 5 00:23:20 vps-588e7d9b server: at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1506) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:285) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:205) Oct 5 00:23:20 vps-588e7d9b server: at javax.servlet.http.HttpServlet.service(HttpServlet.java:650) Oct 5 00:23:20 vps-588e7d9b server: at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:607) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) Oct 5 00:23:20 vps-588e7d9b server: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) Oct 5 00:23:20 vps-588e7d9b server: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) Oct 5 00:23:20 vps-588e7d9b server: at java.lang.Thread.run(Thread.java:748) Oct 5 00:23:20 vps-588e7d9b server: Caused by: java.lang.NoClassDefFoundError: javax/servlet/GenericFilter Oct 5 00:23:20 vps-588e7d9b server: at java.lang.ClassLoader.defineClass1(Native Method) Oct 5 00:23:20 vps-588e7d9b server: at java.lang.ClassLoader.defineClass(ClassLoader.java:756) Oct 5 00:23:20 vps-588e7d9b server: at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:3205) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:1373) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1861) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1735) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.tomcat.websocket.server.WsServerContainer.<init>(WsServerContainer.java:106) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.tomcat.websocket.server.WsSci.init(WsSci.java:137) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:49) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5632) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) Oct 5 00:23:20 vps-588e7d9b server: ... 43 more Oct 5 00:23:20 vps-588e7d9b server: Caused by: java.lang.ClassNotFoundException: javax.servlet.GenericFilter Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1892) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1735) Oct 5 00:23:20 vps-588e7d9b server: ... 55 more Oct 5 00:23:20 vps-588e7d9b server: Oct 05, 2020 12:23:20 AM org.apache.catalina.startup.HostConfig deployWAR Oct 5 00:23:20 vps-588e7d9b server: SEVERE: Error deploying web application archive /var/lib/tomcat/webapps/TRADESYSTEM.war Oct 5 00:23:20 vps-588e7d9b server: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/TRADESYSTEM]] Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:903) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1092) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:560) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1779) Oct 5 00:23:20 vps-588e7d9b server: at sun.reflect.GeneratedMethodAccessor129.invoke(Unknown Source) Oct 5 00:23:20 vps-588e7d9b server: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) Oct 5 00:23:20 vps-588e7d9b server: at java.lang.reflect.Method.invoke(Method.java:498) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301) Oct 5 00:23:20 vps-588e7d9b server: at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) Oct 5 00:23:20 vps-588e7d9b server: at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1506) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:285) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:205) Oct 5 00:23:20 vps-588e7d9b server: at javax.servlet.http.HttpServlet.service(HttpServlet.java:650) Oct 5 00:23:20 vps-588e7d9b server: at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:607) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) Oct 5 00:23:20 vps-588e7d9b server: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) Oct 5 00:23:20 vps-588e7d9b server: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) Oct 5 00:23:20 vps-588e7d9b server: at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) Oct 5 00:23:20 vps-588e7d9b server: at java.lang.Thread.run(Thread.java:748) Oct 5 00:23:20 vps-588e7d9b server: Oct 05, 2020 12:23:20 AM org.apache.catalina.startup.HostConfig deployWAR Oct 5 00:23:20 vps-588e7d9b server: INFO: Deployment of web application archive /var/lib/tomcat/webapps/TRADESYSTEM.war has finished in 2,748 ms Oct 5 00:25:54 vps-588e7d9b server: Oct 05, 2020 12:25:54 AM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile Oct 5 00:25:54 vps-588e7d9b server: INFO: validateJarFile(/usr/share/tomcat/webapps/TRADESYSTEM/WEB-INF/lib/tomcat-embed-core-9.0.30.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class Oct 5 00:25:54 vps-588e7d9b server: Oct 05, 2020 12:25:54 AM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile Oct 5 00:25:54 vps-588e7d9b server: INFO: validateJarFile(/usr/share/tomcat/webapps/TRADESYSTEM/WEB-INF/lib/tomcat-embed-el-9.0.30.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/el/Expression.class Oct 5 00:25:56 vps-588e7d9b server: Oct 05, 2020 12:25:56 AM org.apache.catalina.startup.TldConfig execute Oct 5 00:25:56 vps-588e7d9b server: INFO: 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.
Any sugestions what’s wrong? I’ll be more than grateful for any help.
EDIT:
If it helps – I’ve downloaded sample web project which I just deployed on server and it works well. That project has the above dependency, but difference is in logs after deploy. After deploy that sample app, in logs are typical spring logs:
Oct 5 01:23:36 vps-588e7d9b server: . ____ _ __ _ _ Oct 5 01:23:36 vps-588e7d9b server: /\ / ___'_ __ _ _(_)_ __ __ _ Oct 5 01:23:36 vps-588e7d9b server: ( ( )___ | '_ | '_| | '_ / _` | Oct 5 01:23:36 vps-588e7d9b server: \/ ___)| |_)| | | | | || (_| | ) ) ) ) Oct 5 01:23:36 vps-588e7d9b server: ' |____| .__|_| |_|_| |___, | / / / / Oct 5 01:23:36 vps-588e7d9b server: =========|_|==============|___/=/_/_/_/ Oct 5 01:23:36 vps-588e7d9b server: :: Spring Boot :: (v1.5.3.RELEASE)
but after deploy my app (with attached dependency) there’s no logs like above. There’s just info that application was deployed.
Oct 5 01:37:58 vps-588e7d9b server: Oct 05, 2020 1:37:58 AM org.apache.catalina.startup.HostConfig deployWAR Oct 5 01:37:58 vps-588e7d9b server: INFO: Deploying web application archive /var/lib/tomcat/webapps/app.war Oct 5 01:38:00 vps-588e7d9b server: Oct 05, 2020 1:38:00 AM org.apache.catalina.startup.TldConfig execute Oct 5 01:38:00 vps-588e7d9b server: INFO: 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. Oct 5 01:38:00 vps-588e7d9b server: Oct 05, 2020 1:38:00 AM org.apache.catalina.startup.HostConfig deployWAR Oct 5 01:38:00 vps-588e7d9b server: INFO: Deployment of web application archive /var/lib/tomcat/webapps/app.war has finished in 2,510 ms
Advertisement
Answer
Problem solved. Issue was with version of Tomcat7 which was causing elManager error. I’ve solve that just by upgrading Tomcat to v9. Hopefully it’ll helpful to someone. Topic can be closed.