I've recently updated my server to use OpenJDK 21 and Tomcat 11 (Apache Tomcat/11.0.0-M16). When I try to deploy my WAR file into the Tomcat webapps directory, I encounter the following exception:
java.nio.file.NoSuchFileException: C:\Program%20Files\Apache%20Software%20Foundation\Tomcat%2011.0\webapps\myApp.war
I'm facing a perplexing issue deploying a Spring Boot application packaged as a WAR file to Tomcat 11 running on a Windows-based vServer. Despite ensuring that the application runs smoothly on my local machine and following standard deployment procedures, I encounter persistent deployment failures when attempting to launch the application on the server. The Tomcat server's example applications work without any issues, indicating that the server is operational.
Interestingly, when I access my application's database tables through a tool like HeidiSQL, I can see all the tables, and they seem to function correctly, suggesting that the application's database interactions are intact.
Here are some specifics about my setup and what I've observed:
- I'm using OpenJDK 21 and Tomcat 11, which are the latest versions and should be compatible.
- The example codes that come with the Tomcat installation work fine, indicating that the server setup is correct.
- The problem seems to be isolated to deploying and running on a Windows-based vServer.
- My local development setup uses Spring Boot's embedded Tomcat, which works perfectly.
I have attempted adjusting file permissions and ensuring that the WAR file is not marked as read-only, but to no avail. The same application and deployment method work without any issues on my local setup but fail when deployed to the vServer.
The file path seems correct, and the file exists at the specified location. This error occurs with both my application and a simple "Hello World" application.
What I have tried so far:
- Checking and modifying file system access permissions.
- Checking Catalina and localhost logs in the
logsdirectory for any specific errors but found nothing conclusive. - Repackaging and deploying a simple "Hello World" WAR file.
Could there be a specific configuration or compatibility issue I'm overlooking that's causing this deployment failure? Any insights, suggestions, or similar experiences shared would be greatly appreciated.
I have the same issue. It should be a Tomcat 11 bug (tested on M16 and M17 release), as the same war I put in Tomcat 10 \webapps is deployed correctly.
In the changelog page, look for bug id 68035 (it seems similar to our issue). https://bz.apache.org/bugzilla/show_bug.cgi?id=68035 Even though they marked as "Fixed" , I still face your same issue. I have reverted to Tomcat 10.