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

classloader bug #3403

Closed
snjeza opened this issue Apr 13, 2023 · 2 comments
Closed

classloader bug #3403

snjeza opened this issue Apr 13, 2023 · 2 comments

Comments

@snjeza
Copy link

snjeza commented Apr 13, 2023

A related issue - redhat-developer/vscode-java#3046

The bug is caused by fixing #3373. It can't be reproduced using commit d56b576

Steps To reproduce:

  • install eclipse 4.27+
  • install m2e
  • import project salut
  • close all editors
  • restart eclipse
  • call Project>Clean...
    You will face the following exception;
!MESSAGE Errors running builder 'Java Builder' on project 'salut'.
!STACK 0
java.lang.NoClassDefFoundError: Could not initialize class lombok.launch.PatchFixesHider$ExtensionMethod
	at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:1003)
	at org.eclipse.jdt.internal.compiler.ast.UnaryExpression.resolveType(UnaryExpression.java:249)
	at org.eclipse.jdt.internal.compiler.ast.Expression.resolveTypeExpecting(Expression.java:1147)
	at org.eclipse.jdt.internal.compiler.ast.IfStatement.resolveIfStatement(IfStatement.java:288)
	at org.eclipse.jdt.internal.compiler.ast.IfStatement.resolve(IfStatement.java:317)
	at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:662)
	at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:388)
	at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:571)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1506)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1631)
	at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:668)
	at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:905)
	at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:145)
	at java.base/java.lang.Thread.run(Thread.java:833)

A workaround

  • open a Java class
  • restart eclipse
  • call Project>Clean...

The issue happens when lombok.launch.PatchFixesHider.Transform.init(ClassLoader) is started from the org.eclipse.jdt.core.compiler.batch plugin, See #3332

@Rawi01
Copy link
Collaborator

Rawi01 commented Apr 14, 2023

I already fixed that in #3378, I wasn't aware that this breaks the language server implementation. You can download a working version using the Github actions run artifact: https://github.com/projectlombok/lombok/actions/runs/4497732634

@snjeza
Copy link
Author

snjeza commented Apr 14, 2023

It is fixed with #3378

@snjeza snjeza closed this as completed Apr 14, 2023
snjeza added a commit to snjeza/eclipse.jdt.ls that referenced this issue Apr 15, 2023
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