Testsuite: org.apache.catalina.startup.TestListener Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.779 sec ------------- Standard Error ----------------- 26-Jul-2024 11:09:37.687 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testServletContainerInitializer] 26-Jul-2024 11:09:38.153 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent An older version [1.2.38] of the Apache Tomcat Native library is installed, while Tomcat recommends a minimum version of [1.3.0] 26-Jul-2024 11:09:38.153 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.38] using APR version [1.6.5]. 26-Jul-2024 11:09:38.154 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true]. 26-Jul-2024 11:09:38.154 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] 26-Jul-2024 11:09:38.162 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1f 31 Mar 2020] 26-Jul-2024 11:09:38.847 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-127.0.0.1-auto-1"] 26-Jul-2024 11:09:38.879 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 26-Jul-2024 11:09:38.879 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.92-dev] 26-Jul-2024 11:09:39.048 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-apr-127.0.0.1-auto-1-36961"] 26-Jul-2024 11:09:39.085 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-apr-127.0.0.1-auto-1-36961"] 26-Jul-2024 11:09:39.086 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 26-Jul-2024 11:09:39.102 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-apr-127.0.0.1-auto-1-36961"] 26-Jul-2024 11:09:39.112 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-apr-127.0.0.1-auto-1-36961"] 26-Jul-2024 11:09:39.119 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testServletContextListener] 26-Jul-2024 11:09:39.121 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent An older version [1.2.38] of the Apache Tomcat Native library is installed, while Tomcat recommends a minimum version of [1.3.0] 26-Jul-2024 11:09:39.122 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.38] using APR version [1.6.5]. 26-Jul-2024 11:09:39.122 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true]. 26-Jul-2024 11:09:39.123 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] 26-Jul-2024 11:09:39.124 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1f 31 Mar 2020] 26-Jul-2024 11:09:39.126 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-127.0.0.1-auto-2"] 26-Jul-2024 11:09:39.128 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 26-Jul-2024 11:09:39.129 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.92-dev] 26-Jul-2024 11:09:39.144 SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [org.apache.catalina.startup.TestListener$SCL2] java.lang.IllegalArgumentException: Once the first ServletContextListener has been called, no more ServletContextListeners may be added. at org.apache.catalina.core.ApplicationContext.addListener(ApplicationContext.java:1100) at org.apache.catalina.core.ApplicationContext.addListener(ApplicationContext.java:1062) at org.apache.catalina.core.ApplicationContextFacade.addListener(ApplicationContextFacade.java:615) at org.apache.catalina.startup.TestListener$SCL2.contextInitialized(TestListener.java:96) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4007) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4448) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1203) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1193) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:749) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:721) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1203) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1193) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:749) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:211) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:415) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:878) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164) at org.apache.catalina.startup.Tomcat.start(Tomcat.java:438) at org.apache.catalina.startup.TomcatBaseTest$TomcatWithFastSessionIDs.start(TomcatBaseTest.java:880) at org.apache.catalina.startup.TestListener.testServletContextListener(TestListener.java:66) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63) at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:50) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:535) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1197) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:1042) 26-Jul-2024 11:09:39.148 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file 26-Jul-2024 11:09:39.149 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors 26-Jul-2024 11:09:39.168 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-apr-127.0.0.1-auto-2-35235"] 26-Jul-2024 11:09:39.258 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-apr-127.0.0.1-auto-2-35235"] 26-Jul-2024 11:09:39.258 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 26-Jul-2024 11:09:39.259 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-apr-127.0.0.1-auto-2-35235"] 26-Jul-2024 11:09:39.262 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-apr-127.0.0.1-auto-2-35235"] ------------- ---------------- --------------- Testcase: testServletContainerInitializer took 1.518 sec Testcase: testServletContextListener took 0.145 sec