| Summary: | Lots of class not found exception if I start a runtime Eclipse with jdt.core | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Lars Vogel <Lars.Vogel> | ||||||
| Component: | UI | Assignee: | Stephan Herrmann <stephan.herrmann> | ||||||
| Status: | RESOLVED WORKSFORME | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | Lars.Vogel, loskutov, matthias.sohn, stephan.herrmann | ||||||
| Version: | 4.10 | ||||||||
| Target Milestone: | 4.14 M1 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Lars Vogel
Just to make sure: can you start same IDE with *any other* JDK? Caused by: java.lang.ClassNotFoundException: org.eclipse.jdt.core.IBufferFactory cannot be found by org.eclipse.jdt.ui_3.16.0.v20181019-1929 This means, you are using JDT sources *but* JDT UI is from platform. I guess if you check out JDT UI in the workspace, it will start without issues. (In reply to Andrey Loskutov from comment #1) > Just to make sure: can you start same IDE with *any other* JDK? Just tested with Java 8 and I received the same errors. > Caused by: java.lang.ClassNotFoundException: > org.eclipse.jdt.core.IBufferFactory cannot be found by > org.eclipse.jdt.ui_3.16.0.v20181019-1929 > > This means, you are using JDT sources *but* JDT UI is from platform. I guess > if you check out JDT UI in the workspace, it will start without issues. I just tested this and imported org.eclipse.jdt.ui into my workspace. Now it starts without errors. Why? > I just tested this and imported org.eclipse.jdt.ui into my workspace. Now it
> starts without errors.
No it does not work, I only clean the runtime workspace. After importing a Java project I see the same errors. For example:
!ENTRY org.eclipse.core.resources 4 2 2018-10-25 21:29:41.988
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/compiler/util/ManifestAnalyzer
at org.eclipse.jdt.internal.core.ClasspathEntry.getCalledFileNames(ClasspathEntry.java:1061)
at org.eclipse.jdt.internal.core.ClasspathEntry.resolvedChainedLibraries(ClasspathEntry.java:981)
at org.eclipse.jdt.internal.core.ClasspathEntry.resolvedChainedLibraries(ClasspathEntry.java:968)
at org.eclipse.jdt.internal.core.JavaModelManager.getNonChainingJarsCache(JavaModelManager.java:3588)
at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathListCache(JavaModelManager.java:3599)
at org.eclipse.jdt.internal.core.JavaModelManager.saveClasspathListCache(JavaModelManager.java:4434)
at org.eclipse.jdt.internal.core.JavaModelManager.saving(JavaModelManager.java:4703)
at org.eclipse.core.internal.resources.SaveManager.executeLifecycle(SaveManager.java:384)
at org.eclipse.core.internal.resources.SaveManager$1.run(SaveManager.java:201)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.core.internal.resources.SaveManager.broadcastLifecycle(SaveManager.java:204)
at org.eclipse.core.internal.resources.SaveManager.save(SaveManager.java:1169)
at org.eclipse.core.internal.resources.Workspace.save(Workspace.java:2338)
at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.lambda$1(IDEWorkbenchAdvisor.java:521)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jdt.internal.compiler.util.ManifestAnalyzer cannot be found by org.eclipse.jdt.core_3.16.0.qualifier
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:511)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:414)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:153)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 15 more
Andrey, can you reproduce? So you have now jdt core and ui in the same workspace. Please make sure they are both looking on latest commits and are refreshed. Clean the workspace. Make sure no compile errors is shown. Create new launch config and check if this will work. If not, please create new workspace, import both projects and try again. (In reply to Andrey Loskutov from comment #5) > So you have now jdt core and ui in the same workspace. Please make sure they > are both looking on latest commits and are refreshed. Clean the workspace. > Make sure no compile errors is shown. Create new launch config and check if > this will work. If not, please create new workspace, import both projects > and try again. Did that already. I see still the exceptions? My case works for you? > Did that already. I see still the exceptions? My case works for you?
Typo: I see still the exceptions!
(In reply to Lars Vogel from comment #6) > (In reply to Andrey Loskutov from comment #5) > > So you have now jdt core and ui in the same workspace. Please make sure they > > are both looking on latest commits and are refreshed. Clean the workspace. > > Make sure no compile errors is shown. Create new launch config and check if > > this will work. If not, please create new workspace, import both projects > > and try again. > > Did that already. I see still the exceptions? My case works for you? Not really, no. From other bug I know you are using pretty old EGit version, but I'm on latest nightly. Since EGit appears in the log, please either update or disable EGit from the launch config, and re-check. (
> Not really, no. From other bug I know you are using pretty old EGit version,
> but I'm on latest nightly. Since EGit appears in the log, please either
> update or disable EGit from the launch config, and re-check
Already done for this bug no EGit exception is involved.
(In reply to Lars Vogel from comment #9) > ( > > Not really, no. From other bug I know you are using pretty old EGit version, > > but I'm on latest nightly. Since EGit appears in the log, please either > > update or disable EGit from the launch config, and re-check > > Already done for this bug no EGit exception is involved. In the posted stack EGit Activator is loading JDT UI. (In reply to Andrey Loskutov from comment #10) > (In reply to Lars Vogel from comment #9) > > ( > > > Not really, no. From other bug I know you are using pretty old EGit version, > > > but I'm on latest nightly. Since EGit appears in the log, please either > > > update or disable EGit from the launch config, and re-check > > > > Already done for this bug no EGit exception is involved. > > In the posted stack EGit Activator is loading JDT UI. Jdt exceptions remained the same, even after my EGit update. I can post tomorrow an updated stack trace but the exceptions are the same minus the EGit one. Please attach the full error log. Created attachment 276384 [details]
Full log
Full exception trace attached.
(In reply to Lars Vogel from comment #13) > Created attachment 276384 [details] > Full log > > Full exception trace attached. This section at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at org.eclipse.egit.ui.Activator.hasJavaPlugin(Activator.java:1137) at org.eclipse.egit.ui.Activator.registerTemplateVariableResolvers(Activator.java:351) at org.eclipse.egit.ui.Activator.start(Activator.java:343) implies that all this is still triggered during EGit start-up. I don't know which class loader is used during Class.forName(). Maybe it is not capable of loading JDT/Core classes? Can you try launching the runtime workbench *without* EGit? can you retry with the very latest egit nightly, now that Andrey fixed bug 540487 Created attachment 276414 [details]
Full error log without EGit present in runtime Eclipse
If I remove EGit from the runtime Eclipse, the errors remain. See new attachment for the recent log file.
> Caused by: java.lang.ClassNotFoundException: org.eclipse.jdt.core.IBufferFactory cannot be found by org.eclipse.jdt.ui_3.16.0.v20181019-1929
This implies you are running jdt.ui from the host, not from your workspace. So maybe you are launching an inconsistent mix of host & workspace plugins?
Please attach the target platform used in your workspace plus the launch configuration.
OTOH, org.eclipse.jdt.core.IBufferFactory has not been touched in ages. If you are using jdt.core from your workspace, could you just check if IBufferFactory.class exists below bin/ and is a valid class file?
We've been going in circles here. Attachment 276414 [details] from comment 16 again contains the exception that clearly indicates an unhealthy mix of source & binary plugins. Could be a mistake in the launch configuration / target platform, but not in JDT. Since this very use case works for every JDT committer / contributor on a daily basis, I'm closing this as worksforme. |