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

Eclipse throwing LinkageError #767

Closed
lombokissues opened this issue Jul 14, 2015 · 13 comments
Closed

Eclipse throwing LinkageError #767

lombokissues opened this issue Jul 14, 2015 · 13 comments

Comments

@lombokissues
Copy link

Migrated from Google Code (issue 732)

@lombokissues
Copy link
Author

👤 jorn86   🕗 Aug 29, 2014 at 09:15 UTC

What steps will reproduce the problem?
Not quite sure. It seems to be related to highlighting occurrences, but doesn't always occur. I could sometimes reproduce it by using F3 to go view a library call:

  1. Have a source file that calls a library.
  2. Use F3 to open the library file (make sure it isn't open already) to view the code for that call.
  3. Popup happens

What version of the product are you using? On what operating system?
Lombok 1.14.2 and 1.14.4
Eclipse 4.3
Java 1.7.0_40
Windows 7

Please provide any additional information below.
I've seen this happen with 2 different stacktraces in the error log. Both reference the same Lombok class, but no other Lombok code.

java.lang.LinkageError: lombok/eclipse/agent/PatchFixes
at org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlightingReconciler$PositionCollector.visit(SemanticHighlightingReconciler.java)
at org.eclipse.jdt.core.dom.SimpleName.accept0(SimpleName.java:149)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2562)
at org.eclipse.jdt.core.dom.QualifiedName.accept0(QualifiedName.java:170)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2562)
at org.eclipse.jdt.core.dom.QualifiedName.accept0(QualifiedName.java:170)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2562)
at org.eclipse.jdt.core.dom.QualifiedName.accept0(QualifiedName.java:170)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2562)
at org.eclipse.jdt.core.dom.PackageDeclaration.accept0(PackageDeclaration.java:231)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2562)
at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:218)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514)
at org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlightingReconciler.reconcilePositions(SemanticHighlightingReconciler.java:371)
at org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlightingReconciler.reconciled(SemanticHighlightingReconciler.java:321)
at org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor$1.run(ClassFileEditor.java:716)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

java.lang.LinkageError: lombok/eclipse/agent/PatchFixes
at org.eclipse.jdt.internal.ui.search.OccurrencesFinder.addUsage(OccurrencesFinder.java)
at org.eclipse.jdt.internal.ui.search.OccurrencesFinder.visit(OccurrencesFinder.java:149)
at org.eclipse.jdt.core.dom.QualifiedName.accept0(QualifiedName.java:167)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2562)
at org.eclipse.jdt.core.dom.PackageDeclaration.accept0(PackageDeclaration.java:231)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2562)
at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:218)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514)
at org.eclipse.jdt.internal.ui.search.OccurrencesFinder.performSearch(OccurrencesFinder.java:99)
at org.eclipse.jdt.internal.ui.search.OccurrencesFinder.getOccurrences(OccurrencesFinder.java:104)
at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updateOccurrenceAnnotations(JavaEditor.java:3355)
at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor$6.selectionChanged(JavaEditor.java:3380)
at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:178)
at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup$3.run(SelectionListenerWithASTManager.java:155)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

@lombokissues
Copy link
Author

👤 jorn86   🕗 Nov 10, 2014 at 09:44 UTC

I've just seen this happen with Lombok 1.14.8 in Eclipse 4.4.0 on Java 1.8.0_25 as well.

@lombokissues
Copy link
Author

👤 r.spilker   🕗 Nov 10, 2014 at 09:46 UTC

Would you like to test using the edge release? It is experimental, but uses a different class loader infrastructure: https://projectlombok.org/download-edge.html

Do you have a reproduction recipe?

@lombokissues
Copy link
Author

👤 ddg412   🕗 Nov 20, 2014 at 21:47 UTC

I've also seen the issue (or similar) with:
Lombok 1.14.8
Eclipse 4.4.0
Java 1.7.0_05
Scientific Linux 6.4

For me, it happened when I opened an editor for a Java class that didn't even use Lombok. I had multiple projects in my workspace, however, and a different project does use Lombok.

!ENTRY org.eclipse.core.jobs 4 2 2014-11-20 21:32:01.065
!MESSAGE An internal error occurred during: "Requesting Java AST from selection".
!STACK 0
java.lang.LinkageError: loader (instance of lombok/patcher/equinox/EquinoxClassLoader): attempted duplicate class definition for name: "lombok/eclipse/agent/PatchFixes"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at lombok.patcher.equinox.EquinoxClassLoader.loadClass(EquinoxClassLoader.java:195)
at lombok.patcher.equinox.EquinoxClassLoader.overrideLoadResult(EquinoxClassLoader.java:313)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at org.eclipse.jdt.internal.ui.search.OccurrencesFinder.addUsage(OccurrencesFinder.java)
at org.eclipse.jdt.internal.ui.search.OccurrencesFinder.visit(OccurrencesFinder.java:150)
at org.eclipse.jdt.core.dom.QualifiedName.accept0(QualifiedName.java:168)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2759)
at org.eclipse.jdt.core.dom.PackageDeclaration.accept0(PackageDeclaration.java:225)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2759)
at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:210)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711)
at org.eclipse.jdt.internal.ui.search.OccurrencesFinder.performSearch(OccurrencesFinder.java:100)
at org.eclipse.jdt.internal.ui.search.OccurrencesFinder.getOccurrences(OccurrencesFinder.java:105)
at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updateOccurrenceAnnotations(JavaEditor.java:3355)
at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor$6.selectionChanged(JavaEditor.java:3380)
at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:178)
at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup$3.run(SelectionListenerWithASTManager.java:155)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

@lombokissues
Copy link
Author

👤 r.spilker   🕗 Jan 09, 2015 at 15:51 UTC

Issue #798 has been merged into this issue.

@lombokissues
Copy link
Author

👤 shawn.tuatara   🕗 Feb 08, 2015 at 02:02 UTC

The comment in ﹟763 about toggling the mark occurrences fixed this issue temporarily for me. Would be nice to have this issue resolved as that is an important feature to see into the code better.

Lombok: 1.16.0
Eclipse: STS 3.6.3

@lombokissues
Copy link
Author

👤 reinierz   🕗 Apr 14, 2015 at 20:46 UTC

This may have been fixed in the latest release of lombok (v1.16.4); give it a shot?

@lombokissues
Copy link
Author

👤 igor.berman   🕗 Jul 08, 2015 at 06:12 UTC

I think, 1.16.4 fixed the problem

@lombokissues
Copy link
Author

End of migration

@msimko81
Copy link

Having the same problem with 1.16.6.
The error occur when using 'val' type but is not always reproducible even on the same file after several eclipse restarts.
No message inside workbench error log, just the following popup window:

An internal error occurred during: "Requesting Java AST from selection".loader (instance of lombok/launch/ShadowClassLoader): attempted duplicate class definition for name: "lombok/launch/PatchFixesHider$PatchFixes"

@caarlos0
Copy link

caarlos0 commented Jun 1, 2016

Same here

@tungpham
Copy link

Same for me as well.

@rzwitserloot
Copy link
Collaborator

The duplicate class def thing is a different error entirely, it just so happens to also manifest as a LinkageError; the last 3 comments above this one all reference it. I've made issue #1293 to reflect these new ones. I'm going to consider the original fixed.

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

5 participants