Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrating from SpringBoot 2.7.1 to 3.2.3 but Lombok @SuperBuilder is not working getting error: cannot find symbol #3661

Open
gbhambale5143 opened this issue Apr 25, 2024 · 1 comment

Comments

@gbhambale5143
Copy link

Hi Team,
I am migrating from SpringBoot 2.7.1 to 3.2.3 but Lombok @SuperBuilder is not working getting below error.

cannot find symbol.
private void fillInUserReportFields(UserReport.UserReportBuilder builder,
symbol: class UserReportBuilder
location: class UserReport

I was using lombok 1.18.30 version.

Also tried with below versions as well
1.18.32, 1.18.28, 1.18.22, 1.18.26

Please find the code below:

@Setter @getter @SuperBuilder @EqualsAndHashCode(callSuper = false)
@JsonPropertyOrder({"userId", "location" })
public class UserReport extends MessageBase
{

@JsonProperty(value = "userId", required = true)
private Integer userId;

@JsonProperty(value = "location", required = true)
private String location;

public UserReport (String userId, String location)
{
this.userId = Optional.ofNullable(userId).orElse(-1);
this.location = Optional.of(location).filter(StringUtils::isNotBlank).orElse(null);
}

}

@service
public class MessageService
{

     //method

private void fillInUserReportFields(UserReport.UserReportBuilder builder,
UserEvent event)
{

//body

}

@DaTa
@SuperBuilder @JsonPropertyOrder({ "messageType", "messageNumber"})
public class MessageBase
{
private static final Logger LOGGER = LogManager.getLogger();

@NotNull @notblank
private String messageType;
@NotNull @notblank
private int messageNumber;
private Integer requestNumber;

}

@Rawi01
Copy link
Collaborator

Rawi01 commented Apr 28, 2024

Please check that your build configuration is correct and lombok runs during your build. You can also check if your issue is related to a `javac' problem reported in issue #3331.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants