Cannot save file: Cannot delete temporary file ___jb_old___
Answered
Hi!
I have a very basic Maven webapp running with Jetty. When I try to save my index.jsp changes, while the jetty server is running, IDEA complains that "Cannot save file: Cannot delete temporary file C:\...\index.jsp.___jb_old___". This does happen just on Windows (I need to stop the server, save my changes, and then restart the server), everything works fine on Linux. How can I fix the problem?
Best.
Please sign in to leave a comment.
Volkan,
please see this issue for a workaround.
Thanks Roman for the quick reply. I added -Didea.no.safe.write=true line to C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 11.0\bin\idea.exe.vmoptions file. This time, when I try to save, IntelliJ complains that "Cannot save file: C:\...\index.jsp (The requested operation cannot be performed on a file with a user-mapped section open)". BTW, I'm pretty sure no other applications try to access index.jsp, except IntelliJ.
Hrm... While googling for the new error message, this FAQ I found fixed the problem: http://www.assembla.com/spaces/liftweb/wiki/Fix_file_locking_problem_with_jettyrun
Cannot Save Files problem is still relevant in IDEA 12.1.4
I have tried to use
And yes this error dissapear, but error: Cannot Save Files
So currently the solution (at least in Jetty ) is to add server
default</servlet-name> <init-param> <param-name>useFileMappedBuffer</param-name> <param-value>false</param-value> </init-param> </servlet>
It is really a shitty error when we want to work agile with IDEA the webstorm way !!!!!
Because adding this flag to web.xml can cause later problems !!!!!!!
Rather than posting a rude rant on a 2 year old post, it might be more productive to open a regression bug in you track ;)
Anders,
your files are clearly being locked by Tomcat - there's nothing IDEA can do. There are number of anti-locking tricks - e.g.
If nothing else helps I'd suggest to stop using Windows :)
Agree it is a Windows problem. I do not have the problem on my mac.
My client just insists on using Windows.
Close google driver sync.....
I just restarted my pc and it was fine. (using Windows 10)
i hate to say it but i have the same problem. pycharm keep generating this __jb__old file, really annoying and have no way to resolve it easily. we are paid users and i am very disappointed with this product. Will have to give up using this IDE
Yanni2006 first, you can just turn off the Settings | Appearance & Behavior | System Settings | Back up files before saving option. Second, PyCharm doesn't use the "__jb__old" extension for, like, 3 years; it is recommended to update your IDE.