Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » NoClassDefFoundError for ResourcePlugin(I am getting a NoClassDefFoundError exception attempting to use the ResourcePlugin)
NoClassDefFoundError for ResourcePlugin [message #1030070] Sat, 30 March 2013 16:37 Go to next message
MIchael Laris is currently offline MIchael LarisFriend
Messages: 4
Registered: March 2013
Junior Member
Howdy,

I have nearly completed my first Eclipse plugin. It is a fairly simple plugin that
allows different configurations for the application that I support at my job to be
selected. It works fine from my home system, where I did all the development and
testing, but when I exported the plugin and installed it on my work machine, I get
the following exception:

java.lang.NoClassDefFoundError: org/eclipse/core/resources/ResourcesPlugin
        at zlc.xstore.config.editor.ConfigEditor.saveFile(ConfigEditor.java:640)
        .....


I suspect that I have not configured the plugin correctly, but I cannot see where
my error is. My MANIFEST.MF is as follows:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: XStoreConfig
Bundle-SymbolicName: XStoreConfig; singleton:=true
Bundle-Version: 1.0.1.beta
Bundle-Activator: zlc.xstore.config.Activator
Bundle-Vendor: Michael Laris
Require-Bundle: org.eclipse.ui,org.eclipse.core.runtime,org.eclipse.co
 re.resources;bundle-version="3.8.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
Export-Package: zlc.xstore.config,zlc.xstore.config.editor,zlc.xstore.
 config.preferences
Bundle-ClassPath: lib/jdom-2.0.4.jar,.


and my plugin.xml is:

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>

   <extension
         point="org.eclipse.ui.preferencePages">
      <page
            name="XStore"
            class="zlc.xstore.config.preferences.XStoreConfigPreferencePage"
            id="zlc.xstore.config.preferences.XStoreConfigPreferencePage">
      </page>
   </extension>
   <extension
         point="org.eclipse.core.runtime.preferences">
      <initializer
            class="zlc.xstore.config.preferences.PreferenceInitializer">
      </initializer>
   </extension>

</plugin>


I am not sure if I have an error in the declaration, or deployment.

Any assistance will be appreciated.

Mike Laris
mglaris@gmail.com
Re: NoClassDefFoundError for ResourcePlugin [message #1031845 is a reply to message #1030070] Tue, 02 April 2013 09:15 Go to previous messageGo to next message
Greg Pugh is currently offline Greg PughFriend
Messages: 15
Registered: July 2009
Junior Member
On 30/03/2013 23:33, MIchael Laris wrote:
> Howdy,
>
> I have nearly completed my first Eclipse plugin. It is a fairly simple plugin that
> allows different configurations for the application that I support at my job to be selected. It works fine from my home system, where I did all the
> development and
> testing, but when I exported the plugin and installed it on my work machine, I get the following exception:
>
> java.lang.NoClassDefFoundError: org/eclipse/core/resources/ResourcesPlugin
> at zlc.xstore.config.editor.ConfigEditor.saveFile(ConfigEditor.java:640)
> .....
>
> I suspect that I have not configured the plugin correctly, but I cannot see where
> my error is. My MANIFEST.MF is as follows:
>
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: XStoreConfig
> Bundle-SymbolicName: XStoreConfig; singleton:=true
> Bundle-Version: 1.0.1.beta
> Bundle-Activator: zlc.xstore.config.Activator
> Bundle-Vendor: Michael Laris
> Require-Bundle: org.eclipse.ui,org.eclipse.core.runtime,org.eclipse.co
> re.resources;bundle-version="3.8.0"
> Bundle-RequiredExecutionEnvironment: JavaSE-1.7
> Bundle-ActivationPolicy: lazy
> Export-Package: zlc.xstore.config,zlc.xstore.config.editor,zlc.xstore.
> config.preferences
> Bundle-ClassPath: lib/jdom-2.0.4.jar,.
>
> and my plugin.xml is:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <?eclipse version="3.4"?>
> <plugin>
>
> <extension
> point="org.eclipse.ui.preferencePages">
> <page
> name="XStore"
> class="zlc.xstore.config.preferences.XStoreConfigPreferencePage"
> id="zlc.xstore.config.preferences.XStoreConfigPreferencePage">
> </page>
> </extension>
> <extension
> point="org.eclipse.core.runtime.preferences">
> <initializer
> class="zlc.xstore.config.preferences.PreferenceInitializer">
> </initializer>
> </extension>
>
> </plugin>
>
> I am not sure if I have an error in the declaration, or deployment.
>
> Any assistance will be appreciated.
>
> Mike Laris
> mailto:mglaris@xxxxxxxx

Is your work machine running Eclipse 3.8? If it is an earlier version the org.eclipse.core.resources bundle-version="3.8.0" will fail. Look in the
..log file in the .metadata folder in your workspace to see what has been logged.
Re: NoClassDefFoundError for ResourcePlugin [message #1033834 is a reply to message #1031845] Thu, 04 April 2013 17:48 Go to previous messageGo to next message
MIchael Laris is currently offline MIchael LarisFriend
Messages: 4
Registered: March 2013
Junior Member
Greg,

I do not see anything that looks like version information in the .log file itself.
However, I am running Juno (64-bit) on Windows 7. I developed the plugin using Juno (64-bit) under Linux.

In the eclipse directory, is see a file named .eclipseproduct containing the following:

name=Eclipse Platform
id=org.eclipse.platform
version=4.2.0


Is the plugin specific to 3.8? I thought that 3.8 and 4.2 were virtually the same?

Mike Laris
mglaris@gmail.com
Re: NoClassDefFoundError for ResourcePlugin [message #1058338 is a reply to message #1033834] Mon, 13 May 2013 15:26 Go to previous messageGo to next message
Robert Smith is currently offline Robert SmithFriend
Messages: 3
Registered: May 2013
Junior Member
Did you have any luck sorting this out?

I am having the same problem. I removed the version information entirely (although it was Eclipse itself which suggested the 3.Cool, so that it should accept any resource plugin. Still no luck. Always the same NoClassDefFoundError. I wonder if this is a bug? I, too, can see nothing wrong with my plugin project's configuration.
Re: NoClassDefFoundError for ResourcePlugin [message #1059494 is a reply to message #1058338] Sun, 19 May 2013 21:41 Go to previous messageGo to next message
MIchael Laris is currently offline MIchael LarisFriend
Messages: 4
Registered: March 2013
Junior Member
Robert,

Sorry for the delayed response. We just moved a large project into QA and I've been
too busy to respond. Sadly, I have not yet figured this problem out. I suspect
that the difference lies in how the plugin gets deployed. When I test my plugin
in the Eclipse debugger, it works fine, but not when I attempt to install it outside
of Eclipse. Obviously, Eclipse knows something that I don't. This problem is high
on my priorities list to get done in a couple weeks, when I have vacation and can
devote some quite time to working on my little fun projects, like this one.

If I figure it out, I'll certainly let you know and will post my solution here.
I'll also be very happy to hear any insight you might have had on your issue.

Mike Laris
Re: NoClassDefFoundError for ResourcePlugin [message #1064498 is a reply to message #1058338] Wed, 19 June 2013 13:57 Go to previous message
MIchael Laris is currently offline MIchael LarisFriend
Messages: 4
Registered: March 2013
Junior Member
I finally got back to this and have a solution to the problem. I was installing the Jar file in the wrong directory. When I deployed to the "dropins" directory, the NoClassDefFound exception went away.
Previous Topic:Can a double click listener for particular object type be defined in plugin.xml?
Next Topic:How to connect two different Feature's Activators
Goto Forum:
  


Current Time: Sat Dec 20 22:27:32 GMT 2014

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

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