Unable to find class file

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Unable to find class file

Postby dsowerby » Sun Nov 30, 2008 12:15 pm

Hi

Whenever I attempt to use Designer on a class where UI components use any sort of reference to a class outside that one being designed, I get an error for each occurrence: "Unable to find *.class file for compilation unit <referenced class> Do you have autobuild enabled?"

I do have autobuild enabled, and I get no build or runtime errors except when using Designer.

The log shows errors like the one below:

David


Caused by: java.lang.NullPointerException
at com.swtdesigner.model.swt.rcp.PDEUtilities$6.visit(PDEUtilities.java:674)
at com.swtdesigner.model.swt.rcp.PDEUtilities.visitExtensions(PDEUtilities.java:734)
at com.swtdesigner.model.swt.rcp.PDEUtilities.getPerspectiveInfo(PDEUtilities.java:671)
at com.swtdesigner.model.swt.rcp.perspective.PerspectiveUtils.getPerspectiveIcon(PerspectiveUtils.java:359)
at com.swtdesigner.model.swt.rcp.perspective.shortcuts.perspective.PerspectiveShortcutInfo.getIcon(PerspectiveShortcutInfo.java:38)
at com.swtdesigner.model.swt.rcp.perspective.common.AbstractItemInfo.createItem(AbstractItemInfo.java:57)
at com.swtdesigner.model.swt.rcp.perspective.common.AbstractToolbarContainerInfo.createComposite(AbstractToolbarContainerInfo.java:66)
at com.swtdesigner.model.swt.rcp.perspective.shortcuts.AbstractShortcutsContainerInfo.createComposite(AbstractShortcutsContainerInfo.java:24)
at com.swtdesigner.model.swt.rcp.perspective.PerspectiveFactoryInfo.createPerspective(PerspectiveFactoryInfo.java:310)
at com.swtdesigner.model.swt.rcp.perspective.PerspectiveFactoryInfo.createGUIComponent(PerspectiveFactoryInfo.java:252)
at com.swtdesigner.model.JavaInfo$18.execute(JavaInfo.java:5612)
at com.swtdesigner.model.swing.properties.custom.DesignTimeHelper.execute(DesignTimeHelper.java:54)
dsowerby
 
Posts: 1
Joined: Tue Sep 02, 2008 11:54 am

Re: Unable to find class file

Postby Eric Clayberg » Sun Nov 30, 2008 1:40 pm

In general, it is helpful to see the entire log file rather than just a snippet.

The following FAQ entry should help with any issues finding or loading a class...

http://download.instantiations.com/Desi ... FoundError

Check that the actual .class file exists on disk and that you are running Eclipse with a JDK at or above the level you are compiling the code. A JDK mismatch is a common source of issues like this.

I would also suggest always trying the latest SWT Designer build as the first step.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to SWT Designer

Who is online

Users browsing this forum: No registered users and 2 guests