NoClassDefFoundError for IImportStructureProvider [message #326977] |
Thu, 03 April 2008 15:49  |
Eclipse User |
|
|
|
Originally posted by: sureshpendap.gmail.com
I have an eclipse plugin application which tries to import an existing
project into the eclipse workspace. Following is the source code
ProgressMonitorOutputStream pm = new ProgressMonitorOutputStream();
pm.beginTask("Create Workspace", 100);
pm.setShowSubTaskChanges(true);
pm.forceRefreshInterval(-1);
IWorkspace workspace = ResourcesPlugin.getWorkspace();
IWorkspaceRoot rootWorkspace = workspace.getRoot();
// IProject project = rootWorkspace.getProject("Sunopsis
Beans");
// IPath workspaceFolder = rootWorkspace.getFullPath();
File directory = new File("C:\\work\\odi_11g\\Sunopsis Marker
Icons");
ImportOperation importOperation = new ImportOperation(
rootWorkspace.getFullPath(),
directory,
FileSystemStructureProvider.INSTANCE,
OVERWRITE_ALL_QUERY);
importOperation.setCreateContainerStructure(false);
importOperation.setContext(null);
importOperation.run(new SubProgressMonitor(pm, 1));
I am getting the followign exception
ava.lang.NoClassDefFoundError:
org/eclipse/ui/wizards/datatransfer/IImportStructureProvider
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:157)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createE xecutableExtension(ExtensionRegistry.java:759)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 51)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:74)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
I have compiled my plugin with java 1.4 and compliance level set to 1.4
and am also running it with java 1.4.
The only thing that i did is that i have added the plugins as external
jars to my project in order to get my project compiled as i was not able
to select the particular plugin jar file in the plugin-in dependencies.
|
|
|
|
|
|
Re: NoClassDefFoundError for IImportStructureProvider [message #326989 is a reply to message #326986] |
Thu, 03 April 2008 18:37  |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Suresh,
When you "create" a project you can specify the physical location for it
in the project description...
Suresh Pendap wrote:
> Hi got past the earlier exception by just creating an empty project
> using workspaceRoot.getProject(projectName) and
> project.createProject(projectDescription, pm) call
>
>
> Now the project gets imported into the empty project, however there
> are some problems.
>
> 1. The project doest not have a java nature attached to it. The
> .project file which is copied into the project does have the java
> nature in its content.
> 2. I do not want to physically copy the projects into the workspace
> directory, i would like to just link it the actual file system
> location where the project is located. I basically just want to
> register the java project with the workspace so that when i build the
> workspace programmatically it does not say that the resource does not
> exists.
>
> The ImportOperation seems to be a utility for importing some external
> content into an existing project.
>
> What i want is to be able to import an external existing project into
> the workspace without actually copying it and without UI
>
|
|
|
Powered by
FUDForum. Page generated in 0.02559 seconds