Eclipse "Unable to instantiate class JavaSourceLookupDirector, Expecting stackmap frame at branch target 53" after upgrade

Viewed 4524

Just updated eclipse and now I can't run my spring application anymore.

Version: Eclipse IDE for Java Developers (includes Incubating components) Version: 2020-12 (4.18.0) Build id: 20201210-1552

Error message:

Plug-in "org.eclipse.jdt.launching" was unable to instantiate class "org.eclipse.jdt.internal.launching.JavaSourceLookupDirector". Expecting a stackmap frame at branch target 53 Exception Details: Location: org/eclipse/debug/core/sourcelookup/AbstractSourceLookupDirector.dispose()V @29: goto Reason: Expected stackmap frame at this location. Bytecode: 0000000: b801 f9b6 01fa 4c2b 2ab9 022c 0200 2b2a 0000010: b902 2e02 002a b401 d6b6 01ef 4ea7 0018 0000020: 2db9 021b 0100 c001 004d 2c2a a500 092c 0000030: b902 3a01 002d b902 1a01 009a ffe5 2ab4 0000040: 01d6 b601 eb2a b401 dbc6 0026 2ab4 01db 0000050: 593a 05be 3604 033e a700 1119 051d 324d 0000060: 2cb9 0234 0100 8403 011d 1504 a1ff ef2a 0000070: 01b5 01db 2a01 b501 d7b1

Installed Jdk is: AdoptopenJDK 11.0.9.101-hotspot (also selected as default under Installed JRE)

I already had problems starting eclipse after the update so I set in eclipse.ini:

-vm C:\Program Files\AdoptOpenJDK\jdk-11.0.9.101-hotspot\bin

The application is a normal java spring application, with "gradlew bootRun" runs perfectly fine.

Honestly how can such an obscure error occur? Can anyone help with this issue?

7 Answers

I faced similar issue with eclipse version Version: 2020-12 (4.18.0) where I was getting below error

Plug-in "org.eclipse.jdt.launching" was unable to instantiate class org.eclipse.jdt.internal.launching.JavaSourceLookupDirector".Expecting a stackmap frame at branch target 53

I was running spring boot app with java but found kotlin was also installed which was not required for my project.

To fix, I uninstalled kotlin development tools and restarted eclipse which worked pretty well

You can view all installed software with Help > About Eclipse IDE > Installation details. It might be helpful when you only keep required softwares while uninstalling all non required ones.

Uninstalling Kotlin from About Eclipse IDE> Installation Details > Kotlin > Uninstall solved my problem.

I had exactly the same issue, but I need to import and start Kotlin project, so uninstalling Kotlin plugin is not an option.

My setup: Eclipse 2021-03 + Kotlin Plugin 0.8.21.

Installing latest AspectJ Development Tools (today it is 2.2.4) worked for me, give it a try.

I had the same issue with multiple fresh installions of Eclipse 2020.12 on MacOS Big Sur.

In my case the error seems to have been caused by a "rogue" plugin.

At first I would install Eclipse 2020.12 with a new workspace, make all the config changes (installed JREs, classpath variables, linked resources etc.), install plugins, import existing projects, then attempt to launch. I repeatedly got the error above.

Starting eclipse from the command line with the -clean switch did not help.

Eventually I did a fresh install, and first made a simple HelloWorld java project. This launched without problem. I then gradually continued with configuring and setting up Eclipse, relaunching HelloWorld after every step. The idea is to find out which installation / configuration step would stop launches working.

i.e.

  1. Make a fresh install, with a new workspace.
  2. Change and configure NOTHING.
  3. Make and launch a HellowWorld project.
  4. Make one Eclipse configuration / setup change.
  5. Launch HelloWold.
  6. repeat 4) and 5) above until everything is setup, or the error above occurs.

In my case installing the Kotlin plugin v0.8.21 from Eclipse Marketplace causes the error above. Launches work until I install Kotlin. After removing the Kotlin plugin launches work again. If I re-install Kotlin, they break again.

In your case it might not be Kotlin, perhaps another plugin, or something else again: but a step-by-step install / configure process could help you find what breaks your Eclipse. i.e

I was facing the same issue after installing the Kotlin addon from the marketplace and trying to run a short java script.

Uninstalling the addon + restart worked for me.

Facing the Same with the "Kotlin" Plugin installed. Try to Delete the Plugin and you're good to go.

If you're a Mac User :

Eclipse -> About Eclipse -> Installation Details -> Select (Kotlin) and Uninstall

I faced a very similar issue after the upgrade to Eclipse 2020.12:

Plug-in "org.eclipse.jdt.launching" was unable to instantiate class
"org.eclipse.jdt.internal.launching.JavaSourceLookupDirector".
Expecting a stackmap frame at branch target 50

The only way I found to fix it was to download and make a fresh install of Eclipse.

Related