Java error with deleted files

Hi,
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/ShowcaseAdminService.java; /home/quentin/intellij/...admin/impl/ShowcaseAdminService.java (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 ?

Thanks

5 comments

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).

Denis

0

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/BusinessSkillDao.java; /home/quentin/intellij/...portal/persistence/company/business/hibernate/BusinessSkillDao.java (No such file or directory)
java: error: error reading /home/quentin/intellij/...portal/presentation/universe/buyer/AbstractBuyerUniverseCRUDPage.java; /home/quentin/intellij/...portal/presentation/universe/buyer/AbstractBuyerUniverseCRUDPage.java (No such file or directory)
java: error: error reading /home/quentin/intellij/...portal/persistence/company/business/IMyBusinessIndustryDao.java; /home/quentin/intellij/...portal/persistence/company/business/IMyBusinessIndustryDao.java (No such file or directory)

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



Attachment(s):
log.zip
0

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).

Denis

0

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

    <priority value="info" />


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

Best regards,
  Eugene.
0

Hi,
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.

0

Please sign in to leave a comment.