问题
I'm using Jetty 6 server and sometimes this exception shows up:
java.io.IOException: tmpFile.renameTo(classFile) failed
at org.apache.jasper.compiler.SmapUtil$SDEInstaller.install(SmapUtil.java:235)
at org.apache.jasper.compiler.SmapUtil.installSmap(SmapUtil.java:158)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:390)
at org.apache.jasper.compiler.Compiler.__compile(Compiler.java:437)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:608)
Can this be solved by updating Jetty, or does exist any other way?
Similar but not-for-jetty questions: Cause of 'tmpFile.renameTo(classFile) failed' during JSP compilation, http://dev.eclipse.org/mhonarc/lists/jetty-users/msg02301.html .
Thanks.
回答1:
I was using eclipse and in my case the issue was resolved by just reloading the page once again. The issue occurs first time, but on reloading the page once again I do not see the error.
回答2:
Try to disable indexing tools, virus scanners and so on for .jsp files.
回答3:
This issue can be resolved by just deleting the temp and deployment folders once. Do a fresh deployment and this will work.
来源:https://stackoverflow.com/questions/18826589/cause-of-tmpfile-renametoclassfile-during-jsp-compilation