Small nuisance - having to "repair IDE" and rebuild the whole project every time I restart IDEA Ultimate.
This is only a nuisance, although it is a MAJOR nuisance. Hopefully it is fixed in the 2025.1 final release that is hopefully coming out soon., but hoping that there is a “quick fix” that can be applied to the 2024.2.0.2 version.
(strange since the IDE says I have the latest version, but I see a 2024.3 version on the website - broken updater maybe?)
At least once a day and often more than once I have to restart IDEA Ultimate and rebuild the full Maven project because it thinks that the modules jars/wars are corrupted and thus won't run… even though they were fine before the previous shutdown. My guess is that the IDE is caching some of the compiled/packaged stuff and it gets corrupted on shutdown.
Anybody have any idea about what is happening and how to address it?
Please sign in to leave a comment.
Hello, Bruno!
Thank you for reporting this!
I'm assuming you are referring to IDEA's Artifacts, correct?
Are those derived automatically from the Maven configuration or configured manually?
What are the exact errors messages you're getting when the issue occurs?
The builds are Maven builds, one project, and about 10-20 modules, most of them producing WARs.
What breaks seems to be corrupt zips(or more likely the wars) for a set of modules within the project. Zips that were fine before shutdown the night before but are corrupt the next morning.
The normal complaint is that one of those WARs failed.
What I found to be reliable in band-aiding it for the day is to:
Also, it doesn't happen every day, but nearly every day. It did not seem to happen this morning.
My hope is that when 2025.1 becomes the stable version and I download it… this will go away.
Bruno Genovese I would appreciate more details on how exactly the issue manifests:
Based on what I know so far, I would guess a third-party interference, i. e. something other than IDEA touches the files (or perhaps IDEA's caches), possibly modifying their contents and/or metadata, which causes IDEA to consider them invalid.
I encourage you to give 2025.1 EAP a try as well - you can install it side-by-side with your current instance of IDEA.
I am trying to replicate the problem. Unfortunately it does not happen every single day and it only happens when I first start the computer, IntelliJ Idea and attempt to run. Sometimes it happens every day, sometimes it works fine for a few days in a row. So it might be a bit before I can give you a precise error message.
In the meantime I can give you more details:
The error typically happens during deployment on the actual Tomcat 10 of the various WARs. One or more initial WARs deploy fine, but eventually it reaches a WAR that fails to deploy thinking that the WAR is corrupt, causing the rest of the Tomcat 10 deployment to fail.
At that point nothing will make it work, not even attempting to rebuild the whole project with Maven. Repairing the IDE and invalidating the caches first is the only way to get things back to work. I seem to remember that at this point it is not even necessary to rebuild the project but I am not 100% certain, as I usually rebuild the full project as an extra safety.
From everything I've seen my gut instinct is to think that perhaps the WARs for the Tomcat 10 instance running in IntelliJ are being cached somewhere and somehow getting “stuck there”, and that the IDE repair/cache invalidation clears them… causing the real WARs to be copied back in from the Maven repository or the workspace. But I have no idea why this would happen when I shutdown the IDE and computer at the end of the day and not during the day as I work on the various pieces of code, since it rebuilds fine every time I execute during the day.
I hope this helps.
P.S.: As I mentioned this is a small nuisance, and my hope is that it will fix itself when the stable version of 2025.1 is released and I switch to it, making the issue on 2024.2.0.2 Ultimate (Build #IU-242.20224.419, built on August 19, 2024) not matter anymore. I never had this issue before this version.
Something I noticed when looking up the version in About that might be relevant: Runtime version: 21.0.3+13-b509.4 amd64 (JCEF 122.1.9) VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o…. but I know my CPU is an Intel 64-bit. This might be relevant, or it might not.
Bruno Genovese Thank you for sharing the details!
What type of Run Configuration is used for those two steps:
Spring Boot Run Configuration and an Application Server Run Configuration, I'm guessing?
The exact error message you are getting here:
Would be very very helpful to move the investigation forward. I would also suggest to test if the WARs actually have to be rebuilt after invalidating the caches to make the Project work again.
In regards to this issue:
amd64
is another name forx86_64
architecture, so this should not be a concern.