Java error with deleted files

I've deleted some of my files using intellij, however it happens very often that after a change in a class and a new project compilation, i have this kind of error :

java: error: error reading /home/quentin/intellij/...admin/impl/; /home/quentin/intellij/...admin/impl/ (No such file or directory)

Obviously intellij try to access the files I have deleted, and it fails since they don't exist anymore.

The only way I found to fix it is to rebuild the index, but it takes some times, and the error happen again and again after that, randomly.

How can I clear all intellij cache to fix this problem ?



Hi Quentin,

How do you rebuild the index? Main meu | file | invalidate caches? Please provide information about your java and IJ versions and idea.log (main menu | help | reveal log).



Yep i do it using  Main meu | file | invalidate caches

Using javac 1.6.0_38 to compile java sources, idea 129.161

Logs are attached. I restart intellij, the compilation works fine and show me some errors, I fix some of the errors, try to rebuild and then I get all the errors on all the files I deleted

java: error: error reading /home/quentin/intellij/...portal/persistence/company/business/hibernate/; /home/quentin/intellij/...portal/persistence/company/business/hibernate/ (No such file or directory)
java: error: error reading /home/quentin/intellij/...portal/presentation/universe/buyer/; /home/quentin/intellij/...portal/presentation/universe/buyer/ (No such file or directory)
java: error: error reading /home/quentin/intellij/...portal/persistence/company/business/; /home/quentin/intellij/...portal/persistence/company/business/ (No such file or directory)

PS : rebuild Project make it works again, for some times, and then I get the same error again.


I see that your idea.log is full of records like 'error in opening zip file: /home/quentin/.m2/repository/com/thoughtworks/xstream/xstream/1.3/xstream-1.3-sources.jar'. Could you check if that jars with sources are valid (try to open them by archive manager/unpack their contents).



Hi Quentin,
Could you please change the following line in build-log.xml

    <priority value="info" />

    <priority value="debug" />
then delete build.log file and try to replicate the problem. Then please send me detailed build.log.

Best regards,

Indeed the sources jars was corrupted, I guess maven fucked up.
I removed all of the sources jar and "rebuild Project". I didn't get the error so far. I'll let you know if it happens again and send you the logs as requested.


Please sign in to leave a comment.