IntelliJ filesystem broken

Answered

I don't know how to title this issue but it's driving me mad.

What am I doing:

Usually this happens after I generated code using some Maven functionallity. Essentially it fires up my server and then, using OpenAPI, I am creating some client code. So far so good.

The problem is, that after this process IntelliJ goes crazy. 

The project explorer shows all the files but it behaves as if those files simply do not exist. Especially the files inside src/main/resources. 

What happens:

As I am starting the server, sometimes my application-local.properties seem to be not present. It is present in the project file explorer, I can open it and read it but when I start the server it simply does not find the file. I have to edit that file in order to make it working again. 

The problem: This happens to all my files. There are SQL migraction scripts and HTML templates etc. As the server starts, these files only re-appear if I edit them. LIterally one by one. 

Yes, I have restarted IntelliJ (multiple times) and invalidated the cache but the problem is still not gone after that. 

Not too long ago I even deleted all .idea files and re-created everything from scratch but it is still not working. I have no idea what is happening here.

0
6 comments
Avatar
Permanently deleted user

A small update: I noticed that if I run 

find src/ -exec touch {} \;

Things work as usual. Except that it should not be necessary to do this. 

Any ideas what might be causing this?

0

What timestamps these files and parent directory have? 

Can you record a screencast demonstrating the issue, so we could see all the details? You can share it privately: 


https://intellij-support.jetbrains.com/hc/en-us/articles/206869619-Uploading-Large-Files-for-JetBrains-Support-Team

0
Avatar
Permanently deleted user

I tried to upload a file to ftp://ftp.intellij.net/.uploads but I get an error "Permission denied". I entered "anonymous" as a user and my Email adress as a password.

0
Avatar
Permanently deleted user

I uploaded a file. It's called

mahlzeiten.at.webm

For the explanation:

1) At 0:01 I run my server by clicking the debug button

2) At 0:12 On the top righ I run

mvn verify -P client -DskipTests

which generates code (TypeScript client) into target/generated-sources/angular-client

2) At 1:04 one sees how the server cannot start after hot-swapping. Imo it should not hot-swap in the first place because no source files changed. However, after that one sees an error in the Console coming from Spring after the hot-swap saying: "APPLICATION FAILED TO START .."+

I start clicking the "Update" button and also the debug button (again) in  order to start up the server (1:05 - 1:35) but it just cannot find the .properties file visible in the project file-browser.

3) At 1:36 I execute 

find src/ -exec touch {} \;

in order to make it work again.

4) At 1:38 I click the debug button again and Spring can locate the application-local.properties file again.

Please not: It's usually not this file alone. If I touch only this file, other resources just won't work. It does not seem to affect source code files.

 

0

Can you show the files inside src/ folder using the $ls -lR src/ command before executing touch?

0

Please sign in to leave a comment.