Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » WindowBuider gives java.lang.NoClassDefFoundError: org/eclipse/jdt/core/dom/AnonymousTypeDeclaration
WindowBuider gives java.lang.NoClassDefFoundError: org/eclipse/jdt/core/dom/AnonymousTypeDeclaration [message #786740] Mon, 30 January 2012 19:21 Go to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1049
Registered: July 2009
Senior Member

Hi,

I tried using WindowBuilder in the latest Eclipse 4.2 M5 build. If I open WindowBuilder to open on a Composite I get the stacktrace below. It seems to me that AnnoymousTypeDeclaration2 is not available in Eclipse 4.2M5.

Best regards, Lars

java.lang.ClassNotFoundException: org.eclipse.jdt.core.dom.AnonymousTypeDeclaration2
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.eclipse.wb.internal.core.parser.JavaInfoParser.prepareParseContext(JavaInfoParser.java:1174)
at org.eclipse.wb.internal.core.parser.JavaInfoParser.parse(JavaInfoParser.java:244)
at org.eclipse.wb.internal.core.parser.JavaInfoParser.access$9(JavaInfoParser.java:240)
at org.eclipse.wb.internal.core.parser.JavaInfoParser$1.runObject(JavaInfoParser.java:153)
at org.eclipse.wb.internal.core.parser.JavaInfoParser$1.runObject(JavaInfoParser.java:1)
at org.eclipse.wb.internal.core.utils.execution.ExecutionUtils.runDesignTime(ExecutionUtils.java:153)
at org.eclipse.wb.internal.core.parser.JavaInfoParser.parse(JavaInfoParser.java:151)
at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:522)
at org.eclipse.wb.internal.core.editor.DesignPage.access$9(DesignPage.java:510)
at org.eclipse.wb.internal.core.editor.DesignPage$8$1.run(DesignPage.java:437)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4272)
at org.eclipse.wb.internal.core.editor.DesignPage$8.run(DesignPage.java:434)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF_withProgress(DesignPage.java:453)
at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:403)
at org.eclipse.wb.internal.core.editor.UndoManager.refreshDesignerEditor(UndoManager.java:381)
at org.eclipse.wb.internal.core.editor.UndoManager.activate(UndoManager.java:90)
at org.eclipse.wb.internal.core.editor.DesignPage.handleActiveState_True(DesignPage.java:251)
at org.eclipse.wb.internal.core.editor.DesignPage.handleActiveState(DesignPage.java:229)
at org.eclipse.wb.internal.core.editor.multi.DefaultMultiMode.showPage(DefaultMultiMode.java:125)
at org.eclipse.wb.internal.core.editor.multi.DefaultMultiMode$1.widgetSelected(DefaultMultiMode.java:63)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1282)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1267)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1061)
at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:2746)
at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1433)
at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:257)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3535)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3158)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:999)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:893)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:85)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:579)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:534)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
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:352)
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:616)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:624)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:579)
at org.eclipse.equinox.launcher.Main.run(Main.java:1433)
at org.eclipse.equinox.launcher.Main.main(Main.java:1409)
Re: WindowBuider gives java.lang.NoClassDefFoundError: org/eclipse/jdt/core/dom/AnonymousTypeDeclara [message #786745 is a reply to message #786740] Mon, 30 January 2012 19:27 Go to previous messageGo to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1049
Registered: July 2009
Senior Member

According to https://bugs.eclipse.org/bugs/show_bug.cgi?id=359208#c4 where is something wrong with the installation. I used the Juno update site to install SWT Designer. The following features are listed as installed:


SWT Designer 1.1.0.r37x201109091152 org.eclipse.wb.rcp.feature.feature.group Eclipse.org
Eclipse Plug-in Development Environment 3.7.1.r37x_v20110810-0800-7b7qFVtFEx2XnmZ4jlM5mjM org.eclipse.pde.feature.group Eclipse.org
SWT Designer Core 1.1.0.r37x201109091134 org.eclipse.wb.swt.feature.feature.group Eclipse.org
WindowBuilder Core 1.1.0.r37x201109091012 org.eclipse.wb.core.feature.feature.group Eclipse.org
WindowBuilder Core UI 1.1.0.r37x201109091028 org.eclipse.wb.core.ui.feature.feature.group Eclipse.org
WindowBuilder GroupLayout Support 1.1.0.r37x201109091112 org.eclipse.wb.layout.group.feature.feature.group Eclipse.org

Does anyone see what is missing?
Re: WindowBuider gives java.lang.NoClassDefFoundError: org/eclipse/jdt/core/dom/AnonymousTypeDeclara [message #786858 is a reply to message #786745] Mon, 30 January 2012 22:22 Go to previous messageGo to next message
Vincenzo Caselli is currently offline Vincenzo CaselliFriend
Messages: 100
Registered: January 2012
Senior Member
Hi Lars,
same problem here with latest E4.2 version M5 with Juno update site.
From category "General Purpose Tools" I installed the following (a doubt: why are you seeing versions 1.1.0 here instead of 1.2.0 ?):

Swing Designer 1.2.0.r38x201112040044
SWT Designer 1.2.0.r38x201112040058
SWT Designer Core 1.2.0.r38x201112040036
SWT Designer SWT_AWT Support 1.2.0.r38x201112040108
SWT Designer XWT Support 1.2.0.r38x201112040122
WindowBuilder Core 1.2.0.r38x201112032240
WindowBuilder Core Documentation 1.2.0.r38x201112032255
WindowBuilder Core UI 1.2.0.r38x201112032259
WindowBuilder GroupLayout Support 1.2.0.r38x201112032356
WindowBuilder XML Core 1.2.0.r38x201112032304

Anyway the strange thing is that the class org.eclipse.jdt.core.dom.AnonymousTypeDeclaration2 indeed exists (found with Ctrl-T).
It is part of org.eclipse.wb.jdt.fragment_1.2.0.r38x201112032240.jar, so really do not understand what's wrong...
It looks like a classloader problem with WB designer.



Re: WindowBuider gives java.lang.NoClassDefFoundError: org/eclipse/jdt/core/dom/AnonymousTypeDeclara [message #786888 is a reply to message #786858] Mon, 30 January 2012 23:16 Go to previous messageGo to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1049
Registered: July 2009
Senior Member

@Vincenzo thanks, it good to know that others have same problem. Lets see if someone from the WB team has a suggestion.
Re: WindowBuider gives java.lang.NoClassDefFoundError: org/eclipse/jdt/core/dom/AnonymousTypeDeclara [message #787014 is a reply to message #786888] Tue, 31 January 2012 03:45 Go to previous messageGo to next message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 886
Registered: July 2009
Location: Boston, MA
Senior Member
As stated in Eclipse Bug 359208, I have never seen this caused by anything other than an installation/update problem. Doing a full update or installing into a new, clean Eclipse build always seems to solve the problem (at least based on what the few people who have encountered this have told me).

I have not tried it with Eclipse 4.2M5 yet, so it is always conceivable that the new Eclipse build is doing something to prevent that class from loading.
Re: WindowBuider gives java.lang.NoClassDefFoundError: org/eclipse/jdt/core/dom/AnonymousTypeDeclara [message #787175 is a reply to message #787014] Tue, 31 January 2012 08:44 Go to previous messageGo to next message
Marco Carnazzo is currently offline Marco CarnazzoFriend
Messages: 8
Registered: July 2009
Junior Member
I have the same problem on a clean Eclipse 4.2M5 (on Ubuntu 11.04).
Re: WindowBuider gives java.lang.NoClassDefFoundError: org/eclipse/jdt/core/dom/AnonymousTypeDeclara [message #787198 is a reply to message #786888] Tue, 31 January 2012 09:08 Go to previous messageGo to next message
Vincenzo Caselli is currently offline Vincenzo CaselliFriend
Messages: 100
Registered: January 2012
Senior Member
@Lars and all
I launched E4 with the -clean option, as suggested by Eric, and it worked!!

Vincenzo
Re: WindowBuider gives java.lang.NoClassDefFoundError: org/eclipse/jdt/core/dom/AnonymousTypeDeclara [message #787218 is a reply to message #787198] Tue, 31 January 2012 09:39 Go to previous messageGo to next message
Marco Carnazzo is currently offline Marco CarnazzoFriend
Messages: 8
Registered: July 2009
Junior Member
Great: it works! Smile
Thanks.
Re: WindowBuider gives java.lang.NoClassDefFoundError: org/eclipse/jdt/core/dom/AnonymousTypeDeclara [message #787751 is a reply to message #787218] Tue, 31 January 2012 23:46 Go to previous messageGo to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1049
Registered: July 2009
Senior Member

Thanks Eric, Marco and Vincenzo, -clean works well for me too. I guess I was confused by the "clean build" and took it as "new Eclipse installation".

Thanks!
Re: WindowBuider gives java.lang.NoClassDefFoundError: org/eclipse/jdt/core/dom/AnonymousTypeDeclara [message #787776 is a reply to message #787751] Wed, 01 February 2012 00:35 Go to previous message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 886
Registered: July 2009
Location: Boston, MA
Senior Member
A "new Eclipse installation" would also work.
Previous Topic:Add WindowBuilder TabItem at Runtime
Next Topic:StackOverflowError in WindowBuilder
Goto Forum:
  


Current Time: Mon Dec 22 22:05:49 GMT 2014

Powered by FUDForum. Page generated in 0.01772 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software