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

Cannot find Symbol error while using Lombok Annotations. #1449

Closed
mukeshkamboj opened this issue Aug 5, 2017 · 6 comments
Closed

Cannot find Symbol error while using Lombok Annotations. #1449

mukeshkamboj opened this issue Aug 5, 2017 · 6 comments

Comments

@mukeshkamboj
Copy link

mukeshkamboj commented Aug 5, 2017

I am getting below error while using the lombok.

cannot find symbol
[ERROR] symbol: method builder()
[ERROR] symbol: getXXXXXX()

below are the annotation, I am using.

@AllArgsConstructor(access = AccessLevel.PRIVATE)
@Builder(toBuilder = true)
@Data
@NoArgsConstructor(access = AccessLevel.PRIVATE,force = true)

Maven version is 3.5.0
Below is the pom.xml entries.

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.6.2</version>
				<configuration>
					<compilerVersion>1.8</compilerVersion>
					<source>1.8</source>
					<target>1.8</target>
					<encoding>UTF-8</encoding>
					<compilerArgument>-proc:none</compilerArgument>
					<annotationProcessors>
<annotationProcessor>lombok.launch.AnnotationProcessorHider$AnnotationProcessor</annotationProcessor>
					</annotationProcessors>
				</configuration>
			</plugin>
		</plugins>
	</build>

<dependencies>

		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<version>1.16.18</version>
			<scope>provided</scope>
		</dependency>

</dependencies>

Please advise what is this issue?

@jscharett
Copy link

Was able to resolve my issue. Did not realize that variables declared final had no setter.

@rspilker rspilker closed this as completed Oct 4, 2017
@mukeshkamboj
Copy link
Author

I got the solution of this problem. I had to remove -proc:none that was preventing the lombok annotation to be processed.

@BhargavChoksi
Copy link

BhargavChoksi commented Jan 4, 2019

I got the solution of this problem. I had to remove -proc:none that was preventing the lombok annotation to be processed.
@mukeshkamboj Thanks Mukesh! I just tried every damn thing with my intellij. Your comment helped me to get rid of the issue.

Regards,
Bhargav
Love all, Serve all !

@pengw00
Copy link

pengw00 commented Jan 17, 2019

hi, where is the -proc:none located?

I got the solution of this problem. I had to remove -proc:none that was preventing the lombok annotation to be processed.

@BhargavChoksi
Copy link

BhargavChoksi commented Jan 18, 2019 via email

@xiaotiao
Copy link

xiaotiao commented Jul 1, 2019

i don't know but it solve my problem.

i have two classes use @builder to generate build method. but one is normal, another is abnormal,everything check is ok. but when i run mvn to compile my project, the error as fellow:

can't not find the symbol method builder()

i try to replace the version of the lombok jar, but even through i make the version is latest, it's not ok.

so, i try to import lombok per class that i reference.

it works! it seems a bug.

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

6 participants