I am using lombok in a spring project and building with gradle. All of the things were woking fine before. suddenly some errors have started coming.
Error is "Constructor(Constructor name) is undefined".
Have given all the DTO #Data,#NoArgsConstructor,#AllArgsConstructor, so ideally all the constructor should be available.
I have tried to build the project with old and new versions of Spring tool suite and changed lombok jar as well. but still same or different errors are coming.
Tried with STS4 and STS 3.9.7, 3.9.8 same issue is coming.
Tried lombok 1.16.22, 1.18.0,1.18.2,1.18.8.
Please help me to resolve this issue.
Might be issue with Lombok setup.
Did you follow below listed steps.
Copy the lombok.jar to your STS installation path.
Run the command and update your STS path.
java -jar /path/to/your/lombok.jar
Update the STS.ini (aka SpringToolSuite4.ini) with
-javaagent:lombok.jar
Restart STS/Eclipse.
Steps To Setup Lombok
Related
I wanted to read the source code of a java project, so I cloned the project into a directory, and opened it in VSCode. The project used gradle as a dependency manager. None of the dependencies were downloaded, so I ran
gradle --refresh-dependencies
This seemed to work in getting everything setup, but there were many different errors such as
Cannot make a static reference to the non-static method reload() from the type FastRegistry
This error seemed to be the most common, but VSCode reports 2000 errors. I should mention that this project is a Minecraft Mod, so there may be some conflict with the source code and the mapped class names. I am still a beginner at this kind of stuff, so hopefully there is a simple solution. Here is a link to the project: https://github.com/PorkStudios/FarPlaneTwo/
After asking the project owner about this, I found that this project uses lombok annotations. Because of the weirdly formatted annotations, everything was thrown off.
To fix this for VSCode, which does not support these annotations by default, install the extensions for it.
In addition to this, if you have already loaded the project, you will need to clean the workspace.
I am stuck with a very weird problem.
I have a spring boot project managed by gradle, which has no errors in workspace. But when I run the spring boot application from eclipse (right clicking on #SpringBootApplication file and doing run as java application), it throws the following error:
Application startup failed
java.lang.Error: Unresolved compilation problem:
log cannot be resolved
But the weird thing is, when I run the same application from command line using ./gradle run it works perfectly fine.
Also I have imported few other gradle projects which makes use of lombok and they works perfectly fine from eclipse, so you can assume that lombok is set up perfectly in eclipse.
Just to give you some info, I have already tried the following steps
Refreshed gradle project
cleaned the project and restarted the eclipse
I already have lombok dependency in gradle
Lombok setup is done and other project are able to pick lombok annotations
Downloaded new eclipse version, problem stills exists
I am not able to figure out the problem. Please help!!.
I'm using IntelliJ IDEA Community 2020.2.3.
My project is built around Kotlin 1.3.30 and Java 11.
I've upgraded one of my dependecy to java 11 too, and after that, the IDE shows the dependency under "External Libraries", it build the app without errors, Maven build it from terminal without error, but the IDE shows unresolved references on each occurrency of the classes, functions and imports of that library.
I already tried to empty the cache or deleting idea files and importing again the project, but none of those worked.
Any tips?
You can use CTRL+SHIFT+A and look for Load Maven Changes or CTRL+SHIRT+O to do the same thing
I am getting the following error when running mvn clean test:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/maven/plugin/MojoExecutionException
It's not happening on my development team they say they are running the command just fine.
I've checked the JAVA_HOME and JRE_HOME environments, both fine.
I'm using maven version 3.6.3 and Java version 1.8.0_144
Not sure what to do at this point. This project was installed using IntelliJ git clone
IntelliJ could use a bundled maven version, which could be different from the system/user one. Have you already checked settings of the IDE?
The problem could be related to different option, maybe a log could help more. Be sure that all the dependencies and plugins are downloaded without any problems. In the past I had same issue and it was related to the proxy settings for the download.
Something was wrong with the maven donwload. I remapped the environment settings to use the intellij maven and everything worked great.
I was trying to configure wicket with Eclipse on Ubuntu. I used this guide
So I generated some commands in quickstart tab, paste it into the terminal new maven project was created. Then I ran mvn eclipse:eclipse command. I imported generated project into Eclipse and that`s where my problems started. In project run configurations there was an error in m2 variable, where it references to wicket-core directory. I have 2 directories in wicket-core: 7.5.0-SNAPSHOT and 7.6.0. By default M2_REPO variable references to 7.5.0-SNAPSHOT directory containing wicket-core-7.5.0-SNAPSHOT.jar.lastUpdated, but it is an illegal zip file, so I renamed it to wicket-core-7.5.0-SNAPSHOT.jar.
So when I ran Start class in /src/test/java I get Error: Could not find or load main class com.calculator.Start
I can not figure out whether it is wicket configuration problem or it is versions compliance problem?
I would be very grateful for any help!
I think you face a bug in the quickstart for 7.6.0. Wrongly it uses 7.5.0-SNAPSHOT in pom.xml. You will have to fix the version in a text editor and regenerate the Eclipse project. This is fixed in 7.7.0.