On 27/02/17 10:02, Diego Urenia wrote: > *UPDATE: *Making further tests while I was waiting for some answers I found > out that if I explode the war by myself (unziping the war file into the > webapps folder) I still experience the problem. So I think we can rule out > the assumption that the problem happens while the application is still > exploding the war file and that the file size affects it. > > Another info that might be useful: > > - I am creating this folder using java.io.File#mkdir(); > - I am trying to check if this folder exist using > Class#getResources("/folder");
You need to create the simplest possible test case that demonstrates the problem (e.g. a single servlet) and then show us the code. Mark > > Best regards, > Diego Urneia > > On Mon, Feb 27, 2017 at 10:09 AM, Diego Urenia <dru...@gmail.com> wrote: > >> Hello all, >> >> My application creates a folder to store the config files at the first >> startup and immediately after that the application tries to access this >> folder in order to save some information. >> >> Using Tomcat 6 and 7 everything works fine. >> Using Tomcat 8, 8.5, and 9 the application experiences a weird behavior >> and here are some tests I made which made me think it was a war explosion >> related problem: >> >> - The problem doesn't happen when I am running the application using >> Intellij IDEA, because I use an exploded artifact; >> >> - I've created a dummy application to simulate only the creation and first >> access to this config folder (the same way I am doing in the real >> application) at startup and everything worked fine, which led me to believe >> the size of my application can be what revealed the problem (bigger .war >> file takes longer to be exploded); >> >> - Another test I made in my application was adding a Thread.sleep(5000); >> after creating the folder, which then makes the access to the folder >> possible (maybe because Tomcat had enough time to explode the war file); >> >> It was my belief before having this problem that Tomcat exploded the war >> before it even starts the application, but now I have my doubts. >> >> Three questions: >> >> - Does Tomcat really explode the war before starting the application? >> >> - If it doesn't, how does it work? (pointing the right piece of >> documentation, which I couldn't find is as good as an explanation) >> >> - Can anyone tell me what has changed in this regard from version 6 and >> 7 and the newer ones that led me to this problem? >> >> Best regards, >> Diego Urenia >> >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org