eclipse-jdt / eclipse.jdt.core

Eclipse Public License 2.0
149 stars 118 forks source link

Content Assist yields NoClassDefFoundError: org/eclipse/text/readers/SubstitutionReader since 3.19.400.v20231212-0628 #1741

Open Flexximilian opened 7 months ago

Flexximilian commented 7 months ago

Hi,

I just updated from the last RC to 4.30, and now content assist (CTRL+SPACE) is broken. The popup appears briefly (for a couple hundred ms), and a fast ENTER keypress can successfully select the default suggestion. When left alone though, an modal error dialog appears stating that "An internal error occurred during: "Computing additional info". OK-ing that, one finds the following stacktrace in the error log:

java.lang.NoClassDefFoundError: org/eclipse/text/readers/SubstitutionReader
    at java.base/java.lang.ClassLoader.defineClass1(Native Method)
    at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:283)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:716)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:639)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:607)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:587)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:566)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:335)
    at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:397)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:500)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:416)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:168)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
    at org.eclipse.jdt.core.manipulation.internal.javadoc.CoreJavadocAccess.javadoc2HTML(CoreJavadocAccess.java:420)
    at org.eclipse.jdt.core.manipulation.internal.javadoc.CoreJavadocAccess.getHTMLContentFromSource(CoreJavadocAccess.java:369)
    at org.eclipse.jdt.core.manipulation.internal.javadoc.CoreJavadocAccess.getHTMLContent(CoreJavadocAccess.java:230)
    at org.eclipse.jdt.internal.ui.text.javadoc.JavadocContentAccess2.getHTMLContent(JavadocContentAccess2.java:56)
    at org.eclipse.jdt.internal.ui.text.java.ProposalInfo.extractJavadoc(ProposalInfo.java:93)
    at org.eclipse.jdt.internal.ui.text.java.ProposalInfo.computeInfo(ProposalInfo.java:78)
    at org.eclipse.jdt.internal.ui.text.java.ProposalInfo.getInfo(ProposalInfo.java:63)
    at org.eclipse.jdt.internal.ui.text.java.AbstractJavaCompletionProposal.getAdditionalProposalInfo(AbstractJavaCompletionProposal.java:582)
    at org.eclipse.jface.text.contentassist.AdditionalInfoController$Timer$2$1.run(AdditionalInfoController.java:116)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.lang.ClassNotFoundException: org.eclipse.text.readers.SubstitutionReader cannot be found by org.eclipse.jdt.core.manipulation_1.21.0.v20231212-1437
    at org.eclipse.osgi.internal.loader.BundleLoader.generateException(BundleLoader.java:541)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:536)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:416)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:168)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
    ... 24 more

Since this has worked recently (with Eclipse Java Development Tools 3.19.300.v20231201-0110, Updated on Dec, 5th 2023), I guess this is a recent regression, first seen (by me) after updating to Eclipse Java Development Tools 3.19.400.v20231212-0628.

eclipse.buildId=4.30.0.20231201-1200
java.version=17.0.9
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_AT
Framework arguments:  -product org.eclipse.epp.package.committers.product -product org.eclipse.epp.package.committers.product -product org.eclipse.epp.package.committers.product -product org.eclipse.epp.package.committers.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.committers.product -product org.eclipse.epp.package.committers.product -product org.eclipse.epp.package.committers.product -data file:/C:/Users/<censored>/development/workspace/ -product org.eclipse.epp.package.committers.product

I'll see if I can trace this to a commit if I can find the time later. But maybe I made someone feel a little guilty already ;)

Cheers!

Flexximilian commented 7 months ago

Hmm... Not sure it's related, but also my JavaDoc view stopped working. It seems like the "Link with Selection" doesn't do anything anymore, and the view stays blank, regardless of what's selected. No Exception in the error log though.

iloveeclipse commented 7 months ago

I just updated from the last RC to 4.30

Not sure how you did that, but consider to install fresh final version. I guess some bundles were not properly updated and you have mismatch between expected/observed code.

Flexximilian commented 7 months ago

I just updated from the last RC to 4.30

Disregard that wording, I guess. I thought there was a build labeled 4.30 RC1 or something on https://download.eclipse.org/eclipse/downloads/, around the end of November, at which point I updated from the https://download.eclipse.org/eclipse/updates/I-builds/ site.

So it was more like 4.30 to I20231212-1800.

Not sure how you did that

Well, starting with the 2023-06 SDK, when did a fresh install I was on the I-Builds train doing updates occasionally (on a weekly update notification), or whenever a milestone was released.

BTW, whatever happened to the https://download.eclipse.org/eclipse/releases/milestones/ (or was it updates/milestones) site? Way back when, that was the best option when one wanted the milestones but not neccessarily other I-Builds. You used to call these the "stable" versions (releases and milestones). https://download.eclipse.org/releases/latest does not provide milestones.

Anyway, between my Dec 5th update of JDT 3.19.300.v20231201-0110 and 3.19.400.v20231212-0628 this problem arose.

I'll revert to my Dec. 5th config (which is basically 4.30), and then also try a fresh 2023-12 (4.30) install. Judgeing from my installation history, I expect that to work, since that will not contain 3.19.400.v20231212-0628 and thus not really be all that informative with regard wether that version misses some dependency declaration, or needs a fresher version of whatever provides org.eclipse.text.readers.SubstitutionReader...

I can also try a fresh install of the the I20231212-1800 bundle, to see if the error shows there, but that should be what I have gotten from the update site today. Or maybe not. ;)