On 07 Jul 2023, at 23:23, Graham Leggett <minf...@sharp.fm.INVALID> wrote:
>> When you start Tomcat, do you get a message about /foo/bar being >> deployed in catalina.out? For example, I get this for every deployment: >> >> Jul 06, 2023 4:09:33 PM org.apache.catalina.startup.HostConfig >> deployDirectory >> INFO: Deploying web application directory [/full/path/to/web/application] >> Jul 06, 2023 4:09:39 PM org.apache.catalina.startup.HostConfig >> deployDirectory >> INFO: Deployment of web application directory >> [/full/path/to/web/application] has finished in [6,007] ms > > In tomcat7 I see that line logged, in tomcat9 I do not. Another data point - when starting the application up under tomcat9 in eclipse, there is also no mention in the logs of the web application having been deployed, however I am able to hit the application with curl and receive a sensible result. The application has been silently started. On the target machine, we get no log line same as under eclipse, and no application (404 Not Found). The application might have been silently started at a different URL and with no log line we’ll never know, or it silently failed to start and with no error we’ll never know. In the absence of both an error message, and confirmation of web application deployment, we’re flying blind. Digging into the source, we find three similar strings to say we’re finished deploying a web application. Setting a breakpoint on all three, none of them are hit (or I’m using jdb wrong): main[1] stop No breakpoints set. main[1] stop in org.apache.catalina.startup.HostConfig.deployDirectory Deferring breakpoint org.apache.catalina.startup.HostConfig.deployDirectory. It will be set after the class is loaded. main[1] stop in org.apache.catalina.startup.HostConfig.deployDescriptor Deferring breakpoint org.apache.catalina.startup.HostConfig.deployDescriptor. It will be set after the class is loaded. main[1] stop in org.apache.catalina.startup.HostConfig.deployWAR Deferring breakpoint org.apache.catalina.startup.HostConfig.deployWAR. It will be set after the class is loaded. main[1] resume All threads resumed. > Set deferred breakpoint org.apache.catalina.startup.HostConfig.deployWAR Set deferred breakpoint org.apache.catalina.startup.HostConfig.deployDescriptor Set deferred breakpoint org.apache.catalina.startup.HostConfig.deployDirectory > Regards, Graham —