Plz help

I am following this youtube tutorial for springboot and my code is giving error , attaching the Screenshots , can someone please help , i tried chat gpt and from 2 hours i cant figure out whats going on
No description
No description
No description
125 Replies
JavaBot
JavaBot4d ago
This post has been reserved for your question.
Hey @RAKSHAK! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
ayylmao123xdd
ayylmao123xdd4d ago
waza[ wazap show your lombok config in pom and clear target
RAKSHAK
RAKSHAKOP4d ago
pom file
RAKSHAK
RAKSHAKOP4d ago
i tried to clear cache and everything i could still not running
ayylmao123xdd
ayylmao123xdd4d ago
typical lombok shenanigans u gotta add lombok version for your jdk
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${org.projectlombok.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${org.projectlombok.version}</version>
</path>
dumb formatting
<org.projectlombok.version>1.18.30</org.projectlombok.version>
<org.projectlombok.version>1.18.30</org.projectlombok.version>
this one should work for jdk 17 or you can just put the version in the version tag its whatever
<Tim>
<Tim>4d ago
How does the Employee class look like? You're executing getEmail etc on it, not on the Dto you showed in the screenshot
RAKSHAK
RAKSHAKOP4d ago
still not working mate
No description
RAKSHAK
RAKSHAKOP4d ago
package net.Rakshak.ems_backend.entity; import jakarta.persistence.*; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @Getter @Setter @NoArgsConstructor @AllArgsConstructor @Entity @Table(name= "employees") public class Employee { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Column(name = "first_name") private String firstName; @Column(name = "last_name") private String lastName; @Column(name = "email_id",nullable = false, unique = true) private String email; }
JavaBot
JavaBot4d ago
Please format your code to make it more readable. For java, it should look like this:
​`​`​`​java
public void foo() {

}
​`​`​`​
​`​`​`​java
public void foo() {

}
​`​`​`​
RAKSHAK
RAKSHAKOP4d ago
Employee Class: package net.Rakshak.ems_backend.entity; import jakarta.persistence.*; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @Getter @Setter @NoArgsConstructor @AllArgsConstructor @Entity @Table(name= "employees") public class Employee { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Column(name = "first_name") private String firstName; @Column(name = "last_name") private String lastName; @Column(name = "email_id",nullable = false, unique = true) private String email; }
JavaBot
JavaBot4d ago
Please format your code to make it more readable. For java, it should look like this:
​`​`​`​java
public void foo() {

}
​`​`​`​
​`​`​`​java
public void foo() {

}
​`​`​`​
<Tim>
<Tim>4d ago
btw you can just use @Data to get getter, setter, and the constructors
RAKSHAK
RAKSHAKOP4d ago
No description
<Tim>
<Tim>4d ago
and code blocks work using ```
RAKSHAK
RAKSHAKOP4d ago
trying that now
<Tim>
<Tim>4d ago
it won't fix your issue, but it's shorter ^^ it's <version>
RAKSHAK
RAKSHAKOP4d ago
it just got worse😂 maybe i'll try again after few days
ayylmao123xdd
ayylmao123xdd4d ago
look
<Tim>
<Tim>4d ago
can you remove the <optional> and try again?
ayylmao123xdd
ayylmao123xdd4d ago
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.30</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.30</version>
</path>
do this @RAKSHAK
RAKSHAK
RAKSHAKOP4d ago
thanks man , tried it , some new error showed up
No description
JavaBot
JavaBot4d ago
If you are finished with your post, please close it. If you are not, please ignore this message. Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
ayylmao123xdd
ayylmao123xdd4d ago
did you sync pom and delete target after you sync pom do mvn clean compile after you do mvn clean compile it should work but if it doesnt show the full error log
RAKSHAK
RAKSHAKOP4d ago
it isnt recognizing mvn command maybe i need to re configure it all i'm just starting out , btw what resources / books would you recommend me to get better?
ayylmao123xdd
ayylmao123xdd4d ago
No description
ayylmao123xdd
ayylmao123xdd4d ago
click this icon and then click the command line icon and type mvn clean compile when u hover on it it should say execute maven goal and while you are there click the reload icon it says reload all maven projects once u hover on it
RAKSHAK
RAKSHAKOP4d ago
tried it , still same
ayylmao123xdd
ayylmao123xdd4d ago
show the error
RAKSHAK
RAKSHAKOP4d ago
No description
RAKSHAK
RAKSHAKOP4d ago
deleted target rn
ayylmao123xdd
ayylmao123xdd4d ago
yea did you have target before you started before you got the error or no
RAKSHAK
RAKSHAKOP4d ago
no
ayylmao123xdd
ayylmao123xdd4d ago
yea then u have to do mvn clean compile
RAKSHAK
RAKSHAKOP4d ago
i deleted it then sync it all , then run it
ayylmao123xdd
ayylmao123xdd4d ago
do this
RAKSHAK
RAKSHAKOP4d ago
No description
RAKSHAK
RAKSHAKOP4d ago
mvn not recognized
ayylmao123xdd
ayylmao123xdd4d ago
wrong terminal ok different approach
RAKSHAK
RAKSHAKOP4d ago
do you mean powershell
ayylmao123xdd
ayylmao123xdd4d ago
No description
ayylmao123xdd
ayylmao123xdd4d ago
expand this when you see it double click clean and after its done double click compile
RAKSHAK
RAKSHAKOP4d ago
No description
ayylmao123xdd
ayylmao123xdd4d ago
lifecycle
RAKSHAK
RAKSHAKOP4d ago
No description
RAKSHAK
RAKSHAKOP4d ago
cleaned
ayylmao123xdd
ayylmao123xdd4d ago
now do compile
RAKSHAK
RAKSHAKOP4d ago
still same , a new target is created and same error
No description
ayylmao123xdd
ayylmao123xdd4d ago
double click the error and show the full log disable soft wrap btw
ayylmao123xdd
ayylmao123xdd4d ago
No description
RAKSHAK
RAKSHAKOP4d ago
cant be expanded ,that the full error desc
No description
RAKSHAK
RAKSHAKOP4d ago
ok
ayylmao123xdd
ayylmao123xdd4d ago
click the run thing on the left panel not the hammer the arrow above it
ayylmao123xdd
ayylmao123xdd4d ago
No description
ayylmao123xdd
ayylmao123xdd4d ago
woops
ayylmao123xdd
ayylmao123xdd4d ago
No description
ayylmao123xdd
ayylmao123xdd4d ago
click the arrow > and show what it says
RAKSHAK
RAKSHAKOP4d ago
No description
RAKSHAK
RAKSHAKOP4d ago
yeah theres no error oh how do i disable it?
ayylmao123xdd
ayylmao123xdd4d ago
just click it
RAKSHAK
RAKSHAKOP4d ago
No description
ayylmao123xdd
ayylmao123xdd4d ago
ok did you try double clicking at the error
ayylmao123xdd
ayylmao123xdd4d ago
No description
ayylmao123xdd
ayylmao123xdd4d ago
this
RAKSHAK
RAKSHAKOP4d ago
RAKSHAK
RAKSHAKOP4d ago
nothing happenin
ayylmao123xdd
ayylmao123xdd4d ago
wtf @dan1st | Daniel sigma sigma on the wall come see what lies beneath us all was lombok config error but now it says initialization exception and apparently shows no stack trace lombok config is fixed
dan1st
dan1st4d ago
Can the error be reproduced by bilding it from the command line? Is it possible to get a stack trace?
RAKSHAK
RAKSHAKOP4d ago
dont knwo what that mean , but i'll try
dan1st
dan1st4d ago
Can you build the project from the command line?
RAKSHAK
RAKSHAKOP4d ago
the play button on the top right? the terminal powershell one?
dan1st
dan1st4d ago
yes
RAKSHAK
RAKSHAKOP4d ago
ok
dan1st
dan1st4d ago
mvn verify or press ctrl twice and a dialog should pop up - you can also enter mvn verify there alternatively click on OFFICE there and show that you see on the right
RAKSHAK
RAKSHAKOP4d ago
No description
dan1st
dan1st4d ago
ideally copy it as text you don't have Maven installed, do one of the other things I said that might be the easiest/fastest
RAKSHAK
RAKSHAKOP4d ago
ok
RAKSHAK
RAKSHAKOP4d ago
No description
RAKSHAK
RAKSHAKOP4d ago
nothing
dan1st
dan1st4d ago
oh ok I thought it looked different in IJ try that instead
ayylmao123xdd
ayylmao123xdd4d ago
you mean the mvn icon
dan1st
dan1st4d ago
I mean pressing the ctrl key on the keyboard twice but yes it's equivalent to that
RAKSHAK
RAKSHAKOP4d ago
No description
RAKSHAK
RAKSHAKOP4d ago
did the ctrl thing
ayylmao123xdd
ayylmao123xdd4d ago
😱
dan1st
dan1st4d ago
What happens when double-clicking on the ems-backend [verify] thing? That IntelliJ version is probably too new for me to know how it works lol
ayylmao123xdd
ayylmao123xdd4d ago
it should display the stack trace
RAKSHAK
RAKSHAKOP4d ago
RAKSHAK
RAKSHAKOP4d ago
nothing
ayylmao123xdd
ayylmao123xdd4d ago
did your code ever run before btw before you had the lombok error
RAKSHAK
RAKSHAKOP4d ago
yeah it did
ayylmao123xdd
ayylmao123xdd4d ago
No description
RAKSHAK
RAKSHAKOP4d ago
when error showed up i tried to fix it but couldnt then posted here
ayylmao123xdd
ayylmao123xdd4d ago
did you click this icon btw
RAKSHAK
RAKSHAKOP4d ago
yes , cleaned it , deleted target then ran the app agin
ayylmao123xdd
ayylmao123xdd4d ago
hmmmmmmmmmmmmmmmmm ok
RAKSHAK
RAKSHAKOP4d ago
Google Drive: Sign-in
Access Google Drive with a Google account (for personal use) or Google Workspace account (for business use).
RAKSHAK
RAKSHAKOP4d ago
just posted it
dan1st
dan1st4d ago
What is the eye symbol for there?
ayylmao123xdd
ayylmao123xdd4d ago
filtering stuff
RAKSHAK
RAKSHAKOP4d ago
warning
RAKSHAK
RAKSHAKOP4d ago
No description
dan1st
dan1st4d ago
ah ok
ayylmao123xdd
ayylmao123xdd4d ago
kinda weird that it doesnt show the stack trace tbh
dan1st
dan1st4d ago
Previously IntellIJ showed the Maven output
ayylmao123xdd
ayylmao123xdd4d ago
well it does for me too lol when u click on it
RAKSHAK
RAKSHAKOP4d ago
😵‍💫
ayylmao123xdd
ayylmao123xdd4d ago
uhhhhhhhhhhhhhhhhhh
dan1st
dan1st4d ago
What does the top button do here?
No description
ayylmao123xdd
ayylmao123xdd4d ago
maybe its in surefire logs wraps lines
dan1st
dan1st4d ago
and the second one?
ayylmao123xdd
ayylmao123xdd4d ago
scroll to end
dan1st
dan1st4d ago
ok so there should definitely be the build output there
ayylmao123xdd
ayylmao123xdd4d ago
maybe its in target/surefire-reports should be at least
dan1st
dan1st4d ago
Sure it's the tests that are failing?
RAKSHAK
RAKSHAKOP4d ago
i didnt put any test
ayylmao123xdd
ayylmao123xdd4d ago
first it was lombok error then its this initialization for lombok had to add the version maybe its something wrong with the pom
dan1st
dan1st4d ago
Is there a button like that one somewhere?
No description
ayylmao123xdd
ayylmao123xdd4d ago
whats it named ill find on my version
RAKSHAK
RAKSHAKOP4d ago
let me search
dan1st
dan1st4d ago
Restore Layout
RAKSHAK
RAKSHAKOP4d ago
there isnt
dan1st
dan1st4d ago
Can you try restarting IntelliJ with File > Invalidate Caches > Invalidate Caches and Exit?
RAKSHAK
RAKSHAKOP4d ago
sure will updated here again after some time
JavaBot
JavaBot4d ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.

Did you find this page helpful?