Tomcat JSP page not compiling (java.io.IOException: tmpFile.renameTo(classFile) failed)

后端 未结 5 1032
悲哀的现实
悲哀的现实 2021-02-05 17:38

Each time I run my web application on TomCat it gives me an error. There is nothing wrong with the .jsp files, just that I have to restart the server and sometimes the complete

5条回答
  •  别跟我提以往
    2021-02-05 18:01

    I know this is late but in 2017, using Tomcat 8 this still happens.
    The issue is either one of three things.

    1. You don't have proper permissions
      If this is the case then this should be happening every time with every jsp.
    2. Something funky is going on and you need to clear your work directory.
      If this is the case then the issue is usually happening every time with every jsp but can be intermittent.
    3. Another program, such as McAfee or Windows indexing, is reading the temporary class file and is disallowing it to be renamed.
      This is what happened to my team. McAfee was scanning the newly created file and was causing the issue to be completely intermittent, it would just randomly occur. To fix this you can either go nuclear and uninstall your anti-virus, but if you are in an environment where this is not possible ask your Security Team to add a scanning exclusion on your work folder and on your Apache folder.
      If this is not the issue try turning off Window's file indexing on your work folder and your Apache folder.

提交回复
热议问题