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



125 Replies
⌛
This post has been reserved for your question.
Hey @RAKSHAK! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose 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.
waza[
wazap
show your lombok config in pom
and clear target
pom file
i tried to clear cache
and everything i could
still not running
typical lombok shenanigans
u gotta add lombok version
for your jdk
dumb formatting
this one should work for jdk 17
or you can just put the version in the version tag its whatever
How does the Employee class look like?
You're executing getEmail etc on it, not on the Dto you showed in the screenshot
still not working mate

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;
}
Please format your code to make it more readable. For java, it should look like this:
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;
}
Please format your code to make it more readable. For java, it should look like this:
btw you can just use @Data to get getter, setter, and the constructors

and code blocks work using ```
trying that now
it won't fix your issue, but it's shorter ^^
it's <version>
it just got worse😂 maybe i'll try again after few days
look
can you remove the <optional> and try again?
do this
@RAKSHAK
thanks man , tried it , some new error showed up

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.
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
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?

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
tried it , still same
show the error

deleted target rn
yea
did you have target
before you started
before you got the error
or no
no
yea then u have to do mvn clean compile
i deleted it then sync it all , then run it
do this

mvn not recognized
wrong terminal
ok
different approach
do you mean powershell

expand this
when you see it
double click clean
and after its done
double click compile

lifecycle

cleaned
now do compile
still same , a new target is created and same error

double click the error and show the full log
disable soft wrap btw

cant be expanded ,that the full error desc

ok
click the run thing
on the left panel
not the hammer
the arrow above it

woops

click the arrow >
and show what it says

yeah theres no error
oh
how do i disable it?
just click it

ok
did you try double clicking at the error

this
nothing happenin
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
Can the error be reproduced by bilding it from the command line?
Is it possible to get a stack trace?
dont knwo what that mean , but i'll try
Can you build the project from the command line?
the play button on the top right?
the terminal
powershell one?
yes
ok
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
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
ok

nothing
oh ok I thought it looked different in IJ
try that instead
you mean the mvn icon
I mean pressing the ctrl key on the keyboard twice
but yes it's equivalent to that

did the ctrl thing
😱
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 lolit should display the stack trace
nothing
did your code ever run before btw
before you had the lombok error
yeah it did

when error showed up i tried to fix it but couldnt then posted here
did you click this icon btw
yes , cleaned it , deleted target then ran the app agin
hmmmmmmmmmmmmmmmmm
ok
btw heres the code https://drive.google.com/drive/folders/1bMd-KccuonpBNKUZbNPdHDfHdqnbxcRN?usp=drive_link
Google Drive: Sign-in
Access Google Drive with a Google account (for personal use) or Google Workspace account (for business use).
just posted it
What is the eye symbol for there?
filtering
stuff
warning

ah ok
kinda weird that it doesnt show the stack trace tbh
Previously IntellIJ showed the Maven output
well it does for me too
lol
when u click on it
😵💫
uhhhhhhhhhhhhhhhhhh
What does the top button do here?

maybe its in surefire logs
wraps lines
and the second one?
scroll to end
ok so there should definitely be the build output there
maybe its in target/surefire-reports
should be at least
Sure it's the tests that are failing?
i didnt put any test
first it was lombok error
then its this initialization
for lombok had to add the version
maybe its something wrong with the pom
Is there a button like that one somewhere?

whats it named
ill find on my version
let me search
Restore Layout
there isnt
Can you try restarting IntelliJ with File > Invalidate Caches > Invalidate Caches and Exit?
sure
will updated here again after some time
💤
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.