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

后端 未结 5 949
悲哀的现实
悲哀的现实 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:00

    For me it turned out to be TGitCache.exe from Tortoise Git. Must be trying to update the icon overlays.

    0 讨论(0)
  • 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.
    0 讨论(0)
  • 2021-02-05 18:02

    Clean Tomcar work directory $TOMCAT/work to see if it solved it, and check permissions on work directory structure

    0 讨论(0)
  • 2021-02-05 18:17

    Clean Tomcat's working Directory along with Project.

    Run and Restart the server and it should work

    Clean Working Directory of Tomcat Server

    0 讨论(0)
  • 2021-02-05 18:18

    1) Clean tomcat work directory 2) Restart the workspace(if you are using server inside eclipse). 3) Restart the server.

    This works for me.

    0 讨论(0)
提交回复
热议问题