IntelliJ Idea red Spring and Lombok annotations - intellij-idea

I have a problem with IntelliJ Idea 2020.1 Ultimate Edition. It shows Lombok and Spring annotations and imports in red. The project compiles, I can run tests. I did some googling. I tried to reimport maven projects and go to File->Invalidate Caches/Restart. Then I deleted Idea system directory - it does not help. Before it worked fine, I do not know why it started doing this. Can somebody help me out?

I am not sure it is a correct solution, but it worked for me. I just reinstalled IDEA. It was faster that talk to IDEA support trying to figure out what is the cause of the issue

I got the same problem and fixed it from this way. First download lombok dependency from spring.
Then go to IDE and paste it to pom file and run. It isn't fix your problem. Go to Choose this and clear cache. Then restart.
If isn't fix your problem then go to this site and download relevant version of lombok for your IDE. https://plugins.jetbrains.com/plugin/6317-lombok
enter image description here
Then it will download a file. Then go to where you install the IDE and go to this path and paste that lombok java file.
IDE path
After trying these methods error was fixed. Thank you.

Related

Problem in running a project with aspectJ in IntelliJ IDEA 2022.2.3 (Community Edition)

I am trying to run a project with aspectJ, rather than Java, in IntelliJ IDEA. I had done it before by simply putting "aspectj-1.9.6" in a "Lib" folder and setting the folder "as Library". But I tried it again today and it is not working. I think it might be because I have updated my IntelliJ to version "2022.2.3". I saw in this link that for intelliJ version "2021.1", one should select "ajc" as the project compiler in IntellJ. But it seems that there is no such compiler option in IntelliJ version "2022.2" (as I looked at this link and also searched in this link).
I also tried to install and enable "AspectJ weaver" plugin, but I encounter the following error: "Plugin 'AspectJ weaver' failed to initialize and will be disabled. Please restart IntelliJ IDEA.". Someone has had the same problem in this post, but the answer doesn't work for me, as it refers to this link, which is not compatible with IntelliJ version 2022.2.3:
So, I wonder whether aspectJ is not supported any more in IntelliJ?
Does any one has any suggestion that I could use it with this version of IntelliJ? I do really appreciate any help.
Thanks in advance
IntelliJ IDEA is compatible with AspectJ. I am running the plugin on 2022.2.3 without any problems. But I use IDEA Ultimate, you use Community. Did you notice this in your screenshot?
Compatible with IntelliJ IDEA Ultimate

Nightly Glassfish on Intellij

I'm having trouble with changing GlassFish version to Nigthtly. My Intellij says that it doesn't recognize it as a valid GlassFish home. Could somebody tell me step by step how to get through this?
Soulution:
go to glassfish4/glassfish/lib/install/applications/__admingui/WEB-INF/lib/
change jar name to console-4.1
Although this works I cannot get it to work with the newest version of nightly build.
My mistake was to assume that it was Intellij specific problem, so I installed Netbeans and tried changing GlassFish there and the same problem occured, but this time I knew there's like million more questions on the internet about Netbeans than Intellij and of course I found a solution.

FindBugs in Intellij Idea doesn't refresh the result

Intellij Idea - version 14.1.3. Installed Findbugs plugin (v.0.9.997) and run once.
After fixing found bugs, I run it again but unfortunately the plugin still shows the same list of errors, ignoring my changes. Some of errors even point to the nonexisting lines (which I deleted).
Tried to invalidate IDE cache (with restarting), nevertheless it didn't help.
Could you please assist?
Unlike IntelliJ IDEA's built in inspections, FindBugs uses the class files to find problems, not the source files. Make sure you compile your project after fixing the problems, otherwise FindBugs will keep seeing the problems in the out-of-date class files.

License issue with JRebel and Intellij Idea

I am using JRebel with Intellij Idea in Ubuntu. I have activated the plugin by pasting the code obtained from the website and it worked perfectly, but when i restart my IDE it is asking for the license again and i have to paste the license code each and everytime. How to solve this problem?
EDIT:- jrebel.lic file is not being created in ~/.jrebel/ folder
I'm posting this workaround for those who are struggling with this problem.
Uninstall the jRebel plug-in from the IDE.
Install standalone jRebel from here
Now add the following in the VM options when running the program. -javaagent:/opt/ZeroTurnaround/jrebel/jrebel.jar
This is how i solved my problem, i don't know whether it will work for others too.

How to resolve a conflict in JetGradle on IntelliJ IDEA 11.1.2?

I am new to the Gradle integration JetGradle in IntelliJ IDEA 11.1.2 and currently I ran into a conflict with a compile time dependency.
Currently I do not know how to solve this conflict since IDEA does not provide me more informations than this little screenshot. Do you ran into a similar problem and were able to fix it? Any hints are appreciated.
Update: I have found out that IntelliJ IDEA is somehow unable to attach the joda-time-2.1.jar to the joda-time-2.1 library .
If I then manually add the JAR the conflict is successfully resolved. Is there a way IntelliJ can tell my why it does not add the JAR?
Yes, the problem is that the library is defined either in gradle or IDE but the jar is not attached to it at the IDE side.
AFAI there is no GUI at the IDE side that helps to resolve this situation. Please create a dedicated feature request at the tracker.
Denis