Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Error when deploying an application to Tomcat on Windows
Error when deploying an application to Tomcat on Windows [message #1863789] Tue, 27 February 2024 07:12 Go to next message
Miloslav Frajdl is currently offline Miloslav FrajdlFriend
Messages: 48
Registered: June 2018
Member
Hi, I have a problem.

I created an application in Scout 23. When I try to deploy it to Tomcat on Windows, it reports an error:
26-Feb-2024 20:14:51.732 SEVERE [http-nio-8030-exec-12] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class [org.eclipse.scout.rt.server.commons.WebappEventListener]
	java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
		at java.base/java.lang.ClassLoader.defineClass1(Native Method)
		at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
		at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
		at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2352)
		at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:800)
		at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1317)
		at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1165)
		at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:491)
		at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:473)
		at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:143)
		at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4365)
		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4876)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
		at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:683)
		at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:658)
		at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:712)
		at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:969)
		at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
		at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1703)
		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
		at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.base/java.lang.reflect.Method.invoke(Method.java:566)
		at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:294)
		at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:809)
		at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
		at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1477)
		at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:268)
		at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:195)
		at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:590)
		at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205)
		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
		at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:447)
		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
		at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
		at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:129)
		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
		at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
		at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
		at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:597)
		at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:355)
		at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:54)
		at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
		at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
		at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:673)
		at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
		at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
		at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391)
		at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
		at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896)
		at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1744)
		at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
		at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
		at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
		at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
		at java.base/java.lang.Thread.run(Thread.java:834)
	Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContextListener
		at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1353)
		at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1165)
		... 61 more
26-Feb-2024 20:14:51.732 SEVERE [http-nio-8030-exec-12] org.apache.catalina.core.StandardContext.listenerStart Skipped installing application listeners due to previous error(s)


Tomcat was installed by someone else. I assume that not all important things are installed on the computer, but unfortunately I have no idea what is missing and what is causing this error. (On my computer with Eclipse, the application works fine.)

Note: I created a clean application "HelloScout" and it can't be deployed in this environment either. The error is the same, so the problem is not in the application itself, but in the system configuration.

Other informations:
Scout version: 23.2.15 (Java execution environment JavaSE-17)
Windows version: Windows Server 2012 R2 (yes, I know it's an old system, but it's a customer's system and I have no way to change it).
Java version:
>java -version
java version "11.0.21" 2023-10-17 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.21+9-LTS-193)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.21+9-LTS-193, mixed mode)


Can someone please advise me what to install to make it work?
Thank you very much in advance for any advice.
Re: Error when deploying an application to Tomcat on Windows [message #1863792 is a reply to message #1863789] Tue, 27 February 2024 08:27 Go to previous messageGo to next message
Matthias OtterbachFriend
Messages: 55
Registered: August 2015
Location: Munich
Member
Do you know the Tomcat version you are using? Tomcat 10?

Between Tomcat 9 and Tomcat 10 there is a breaking change as the javax.* classes/interfaces are now available at jakarta.* - see https://tomcat.apache.org/migration-10.html

According to the link above there may also be an automatic migration if you place the web application in your webapps-javaee folder - however I have never tested this.

With Scout 24.1 we are also using the newer jakarta package prefixes.

[Updated on: Tue, 27 February 2024 08:51]

Report message to a moderator

Re: Error when deploying an application to Tomcat on Windows [message #1863793 is a reply to message #1863792] Tue, 27 February 2024 08:39 Go to previous messageGo to next message
Miloslav Frajdl is currently offline Miloslav FrajdlFriend
Messages: 48
Registered: June 2018
Member
It's Tomcat 10.1.
Would a downgrade to Tomcat 9 help?

[Updated on: Tue, 27 February 2024 08:40]

Report message to a moderator

Re: Error when deploying an application to Tomcat on Windows [message #1863794 is a reply to message #1863793] Tue, 27 February 2024 08:51 Go to previous messageGo to next message
Matthias OtterbachFriend
Messages: 55
Registered: August 2015
Location: Munich
Member
Downgrade to Tomcat 9 should resolve this error.
Re: Error when deploying an application to Tomcat on Windows [message #1863795 is a reply to message #1863794] Tue, 27 February 2024 08:52 Go to previous message
Miloslav Frajdl is currently offline Miloslav FrajdlFriend
Messages: 48
Registered: June 2018
Member
Thank you very much.
Previous Topic:Easiest way to run the UI on computer
Next Topic:Horizontal Scroll Calendar
Goto Forum:
  


Current Time: Tue May 28 08:42:51 GMT 2024

Powered by FUDForum. Page generated in 0.05033 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top