My project is broken in 2021.1

Answered

Hello,

I have a 10+ years old project with lots of modules - several war, GWT and regular jar modules. All strung together with Maven. It has always worked, and works in 2020.3 as well.

After upgrading to 2021, it is pretty messed up. First: everything builds in maven from the command prompt, i can run in Tomcat.

In intellij, though, it suddenly can't find libraries. If i go in to module settings, libraries that exist are red, even though it's in the location in my repo.

Those errors can sometimes be fixed by "reimporting". But when i open intellij again, it's messed up again.

Furthermore, i cannot run my project within intellij/jetty anymore. When i try to run, it complains about not finding basic classes like HttpServletResponse, "cannot access javax.servlet.Filter".

Another thing that i think i have another ticket for, is that when i start intellij, and try to run my war, it says "no GWT module found". If i then again "reimport", it finds the module again...(until if i build with mvc from the command prompt, after which no gwt module can be found again)

 

These things make 2021.1 unusable for me. I'm not sure what i can do, given that i can build the project outside intellij, and it works prior to 2021.1. I have downgraded to 2020.3 to be able to work.

 

5
9 comments

For me the only solution was to delete the project en pull it from git.

15/4: Alas, after a few checkouts from different branches with git the problem reoccurs. I removed the while ~/Library/Caches/JetBrains/<version> directory and now it works again.

I work with a macbook.

1

I have the same problem. I thought invalidating cache & restart had fixed it for me, but the problem occurred again after my computer restarted.

0

Does it help if you delete the System directory: https://www.jetbrains.com/help/idea/tuning-the-ide.html#system-directory when the IDE is not running?

Please follow https://youtrack.jetbrains.com/issue/IDEA-247439 for updates. We are working on this problem. Sorry for the inconvenience.

0

I have the same issue. Deleting the system directory helps until I reboot and then the problem returns.

I reverted back to 2020.3

0

I have exactly the same problem

0

I also have this problem.  I don't think https://youtrack.jetbrains.com/issue/IDEA-247439 is it, unless you've somehow made it worse in 2021.1?  I haven't seen the problem until this version.

0

I agree with Christopher, i'm not sure that the ticket you're linking to is the same problem since just like him, i didn't have the problem before. It does seem like a similar issue so perhaps they are related.

0

It's all sorts of weird to be honest.  When editing Maven poms some of the vanilla Maven plugins (like compiler!) are highlighted in red because they are 'not found', but if you try to code-complete them code-completion can find them, then the POM editor thinks they are 'found' again until the next restart.  When I try to build the compiler complains that it cannot find classes in the dependency jars, even though a 'real' Maven CLI build works fine.  idea.log shows a lot of 'FileNotFoundExceptions' in the Maven indexing, deleting the Maven index folder does nothing to fix this, it just ends up broken again.

0

>When editing Maven poms some of the vanilla Maven plugins (like compiler!) are highlighted in red because they are 'not found'

Do they exist in the Maven local repository? We've made some improvements for Maven validation. It should be better in 2020.1.1 version.

>When I try to build the compiler complains that it cannot find classes in the dependency jars, even though a 'real' Maven CLI build works fine.

When you are experiencing this problem, please provide this information in a separate YouTrack issue. Thank you very much in advance.

>idea.log shows a lot of 'FileNotFoundExceptions' in the Maven indexing, deleting the Maven index folder does nothing to fix this, it just ends up broken again.

Maven indexing can only affect code insight features in pom.xml editor (completion, highlighintg etc) it does not affect project build and project sources resolve.

0

Please sign in to leave a comment.