Cause of 'tmpFile.renameTo(classFile)' during JSP compilation

坚强是说给别人听的谎言 提交于 2019-12-23 09:02:12

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!