| Summary: | [mac] NoClassDefFoundError in TaskElementLabelProvider | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Frank Becker <eclipse> | ||||||||
| Component: | Mylyn | Assignee: | Steffen Pingel <steffen.pingel> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P1 | CC: | ghtukjk, me, mik.kersten, njbartlett, scott | ||||||||
| Version: | unspecified | ||||||||||
| Target Milestone: | 3.0.1 | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Bug Depends on: | 241062 | ||||||||||
| Bug Blocks: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Frank Becker
That looks like an incomplete installation. Can you check the Mylyn plug-ins and versions that you have installed in Help > About > Configuration Details? Hi Steffen, I think the problem could be that I have installed the Mylyn CDT Bridge without the CDT feature. Now I use a new installation without that bridge. I tell you when that problem show up again. *** Bug 240557 has been marked as a duplicate of this bug. *** (In reply to comment #1) Here are my installed Mylyn features and plugins: *** Features: org.eclipse.mylyn_feature (3.0.0.v20080619-1900) "Mylyn" org.eclipse.mylyn.context_feature (3.0.0.v20080619-1900) "Mylyn" org.eclipse.mylyn.ide_feature (3.0.0.v20080619-1900) "Mylyn" org.eclipse.mylyn.java_feature (3.0.0.v20080619-1900) "Mylyn" org.eclipse.mylyn.pde_feature (3.0.0.v20080619-1900) "Mylyn" org.eclipse.mylyn.team_feature (3.0.0.v20080619-1900) "Mylyn" *** Plug-in Registry: org.eclipse.mylyn (3.0.0.v20080619-1900) "Mylyn" [Starting] org.eclipse.mylyn.bugzilla.ide (3.0.0.v20080619-1900) "Mylyn Bugzilla IDE Extensions" [Starting] org.eclipse.mylyn.commons.core (3.0.0.v20080619-1900) "Mylyn Commons Core" [Resolved] org.eclipse.mylyn.commons.net (3.0.0.v20080619-1900) "Mylyn Commons Net" [Active] org.eclipse.mylyn.commons.ui (3.0.0.v20080619-1900) "Mylyn Commons UI" [Active] org.eclipse.mylyn.compatibility (3.0.0.v20080619-1900) "Java 5 Compatibility Checker" [Active] org.eclipse.mylyn.context.core (3.0.0.v20080619-1900) "Mylyn Context Core" [Active] org.eclipse.mylyn.context.ui (3.0.0.v20080619-1900) "Mylyn Context UI" [Active] org.eclipse.mylyn.help.ui (3.0.0.v20080619-1900) "Mylyn Help" [Starting] org.eclipse.mylyn.ide.ant (3.0.0.v20080619-1900) "Mylyn Ant Bridge" [Active] org.eclipse.mylyn.ide.ui (3.0.0.v20080619-1900) "Mylyn IDE UI" [Active] org.eclipse.mylyn.java.tasks (3.0.0.v20080619-1900) "Mylyn Java Tasks" [Starting] org.eclipse.mylyn.java.ui (3.0.0.v20080619-1900) "Mylyn Java Bridge" [Active] org.eclipse.mylyn.jira.core (3.0.0.v20080619-1900) "Mylyn Jira Connector Core" [Active] org.eclipse.mylyn.jira.ui (3.0.0.v20080619-1900) "Mylyn JIRA Connector UI" [Active] org.eclipse.mylyn.monitor.core (3.0.0.v20080619-1900) "Mylyn Monitor Core" [Resolved] org.eclipse.mylyn.monitor.ui (3.0.0.v20080619-1900) "Mylyn Monitor UI" [Active] org.eclipse.mylyn.pde.ui (3.0.0.v20080619-1900) "Mylyn PDE Bridge" [Active] org.eclipse.mylyn.resources.ui (3.0.0.v20080619-1900) "Mylyn Resources UI" [Active] org.eclipse.mylyn.tasks.bugs (3.0.0.v20080619-1900) "Mylyn Bug Reporting" [Starting] org.eclipse.mylyn.tasks.core (3.0.0.v20080619-1900) "Mylyn Tasks Core" [Resolved] org.eclipse.mylyn.tasks.ui (3.0.0.v20080619-1900) "Mylyn Tasks UI" [Active] org.eclipse.mylyn.team.cvs (3.0.0.v20080619-1900) "Mylyn CVS Extensions" [Resolved] org.eclipse.mylyn.team.ui (3.0.0.v20080619-1900) "Mylyn Team UI" [Active] The class that fails to load is in the org.eclipse.mylyn.commons.ui plug-in which is listed as Active and has the right version. Neil, are there any other related errors in the log, e.g. plug-ins failing to load? Mik, do you have any ideas what could be causing this? (In reply to comment #5) Aha, yes. It appears there are a few related errors. It seems the problem may well be related to decorators; this would explain why I see the NoClassDefFound popups at unpredictable times but the IDE continues to work as normal. I don't know what the decorators are supposed to look like in Mylyn so would not have noticed that they were different or missing. --------------------------------------------------- Message: Could not load repository template extension repository Stack Trace: None --------------------------------------------------- Message: Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench". Stack Trace: java.lang.ExceptionInInitializerError at org.eclipse.mylyn.internal.context.ui.InterestDecoratorLightweight.decorate(InterestDecoratorLightweight.java:69) at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition.decorate(LightweightDecoratorDefinition.java:269) at org.eclipse.ui.internal.decorators.LightweightDecoratorManager$LightweightRunnable.run(LightweightDecoratorManager.java:72) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.decorate(LightweightDecoratorManager.java:356) at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.getDecorations(LightweightDecoratorManager.java:338) at org.eclipse.ui.internal.decorators.DecorationScheduler$1.ensureResultCached(DecorationScheduler.java:374) at org.eclipse.ui.internal.decorators.DecorationScheduler$1.run(DecorationScheduler.java:334) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:3777) at org.eclipse.swt.SWT.error(SWT.java:3695) at org.eclipse.swt.SWT.error(SWT.java:3666) at org.eclipse.swt.widgets.Display.error(Display.java:1126) at org.eclipse.swt.widgets.Display.checkDevice(Display.java:627) at org.eclipse.swt.graphics.Device.getDPI(Device.java:370) at org.eclipse.swt.graphics.Font.init(Font.java:398) at org.eclipse.swt.graphics.Font.<init>(Font.java:143) at org.eclipse.jface.resource.FontRegistry$FontRecord.getBoldFont(FontRegistry.java:116) at org.eclipse.jface.resource.FontRegistry.getBold(FontRegistry.java:609) at org.eclipse.mylyn.internal.provisional.commons.ui.CommonFonts.<clinit>(CommonFonts.java:25) ... 9 more --------------------------------------------------- Message: Exception in Decorator Stack Trace: None --------------------------------------------------- Message: java.lang.ExceptionInInitializerError Stack Trace: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:3777) at org.eclipse.swt.SWT.error(SWT.java:3695) at org.eclipse.swt.SWT.error(SWT.java:3666) at org.eclipse.swt.widgets.Display.error(Display.java:1126) at org.eclipse.swt.widgets.Display.checkDevice(Display.java:627) at org.eclipse.swt.graphics.Device.getDPI(Device.java:370) at org.eclipse.swt.graphics.Font.init(Font.java:398) at org.eclipse.swt.graphics.Font.<init>(Font.java:143) at org.eclipse.jface.resource.FontRegistry$FontRecord.getBoldFont(FontRegistry.java:116) at org.eclipse.jface.resource.FontRegistry.getBold(FontRegistry.java:609) at org.eclipse.mylyn.internal.provisional.commons.ui.CommonFonts.<clinit>(CommonFonts.java:25) at org.eclipse.mylyn.internal.context.ui.InterestDecoratorLightweight.decorate(InterestDecoratorLightweight.java:69) at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition.decorate(LightweightDecoratorDefinition.java:269) at org.eclipse.ui.internal.decorators.LightweightDecoratorManager$LightweightRunnable.run(LightweightDecoratorManager.java:72) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.decorate(LightweightDecoratorManager.java:356) at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.getDecorations(LightweightDecoratorManager.java:338) at org.eclipse.ui.internal.decorators.DecorationScheduler$1.ensureResultCached(DecorationScheduler.java:374) at org.eclipse.ui.internal.decorators.DecorationScheduler$1.run(DecorationScheduler.java:334) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Thanks Neil. That looks like the cause of the bug. I'll look into fixing this. (In reply to comment #2) > Hi Steffen, > > I think the problem could be that I have installed the Mylyn CDT Bridge without > the CDT feature. > > Now I use a new installation without that bridge. > > I tell you when that problem show up again. Until now ererything is OK. Install without Mylyn CDT Bridge solve the problem for me. It's a race condition: When the CommonFonts class is loaded from a thread that is not the UI thread (e.g. background decoration) class initialization will fail, subsequently causing ClassNotFoundErrors. Mik, the most straight forward fix I can think of is to access the font field in the constructor of InterestDecoratorLightweight to force initialization on the UI thread? Created attachment 107538 [details]
mylyn/context/zip
Created attachment 107543 [details]
work around
Created attachment 107544 [details]
mylyn/context/zip
I have committed a work around which initialized the CommonsFont class from the UI thread during startup of tasks ui. I can't reproduce the problem on Linux (or with Eclipse 3.3 on Windows) though since Font initialization does not check for the UI thread on those systems. I'll keep this bug open and move it to 3.0.2 since we may have to investigate a better solution to the problem. This will be fixed in platform in Eclipse 3.4.1 (bug 241062). I'll keep the workaround to ensure Mylyn is backwards compatible with Eclipse 3.4.0. *** Bug 247574 has been marked as a duplicate of this bug. *** *** Bug 238977 has been marked as a duplicate of this bug. *** Is the patch OK for eclipse indigo 3.7 linux x64? I just tried to integrate but seems there is a mismatch presents I have exception as ---------- org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NoClassDefFoundError: org/eclipse/mylyn/internal/provisional/commons/ui/AbstractNotificationPopup) at org.eclipse.swt.SWT.error(SWT.java:4282) at org.eclipse.swt.SWT.error(SWT.java:4197) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3563) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3212) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) at org.eclipse.equinox.launcher.Main.run(Main.java:1410) at org.eclipse.equinox.launcher.Main.main(Main.java:1386) Caused by: java.lang.NoClassDefFoundError: org/eclipse/mylyn/internal/provisional/commons/ui/AbstractNotificationPopup at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClassHoldingLock(ClasspathManager.java:626) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:601) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:562) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:486) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:459) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216) at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400) at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:35) at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:473) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at com.google.gdt.eclipse.suite.ext.update.CompositeArtifactsDowloadJobChangeListener$3.run(CompositeArtifactsDowloadJobChangeListener.java:301) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135) ... 23 more Caused by: java.lang.ClassNotFoundException: org.eclipse.mylyn.internal.provisional.commons.ui.AbstractNotificationPopup at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 42 more ----------- ...every time I add widget when code generation is supposed to gen code locally in constructor :( |