Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » ClassNotFound Exception
ClassNotFound Exception [message #287618] Tue, 05 July 2005 13:58 Go to next message
Kevin Stedman is currently offline Kevin StedmanFriend
Messages: 34
Registered: July 2009
Member
I hope someone can help me. I have been trying to export my RCP from
eclipse. My RCP executes just fine in Eclipse. When I try to execute it
after I have exported it I receive from BundleLoader, ClassNotFound
Execpetions.

Is there a way to debug what is going on? All my class files are there in
the plugins directory. I am using Eclipse 3.1 with Java 1.5b4.
Re: ClassNotFound Exception{FIXED] [message #287759 is a reply to message #287618] Wed, 06 July 2005 20:27 Go to previous messageGo to next message
Kevin Stedman is currently offline Kevin StedmanFriend
Messages: 34
Registered: July 2009
Member
Well after 4 frustrating days of debugging this problem I finally figured
it out.

4 days ago was the first time I have tried to export my RCP since I was
using 3.0.1 of eclipse. So when I first started having this problem I
converted all my current plugins that had no Manifest file to using the
Manifest file and only using the plugin.xml when I had extensions. This
is the current philosophy of eclipse. The default for eclipse is to
create the Manifest file so I had some plugins with Manifest and some
without. My problem just seemed to get worse. I played with just about
every setting in eclipse and I even rebuilt my plugins from scratch with
just copying the source code itself into the new version of the plugin.

Today I had some else tell me they were having no problem exporting their
RCP so we compared setups. The only difference we found was that he was
using NO Manifest files only plugin.xml. So I removed all my Manifest
files and created by hand the plugin.xml files so that eclipse only
recognized plugin.xml (NO Manifest). Everything is now working just fine
again. All my plugins are now using just plugin.xml, NO Manifest files.

To go into more detail about Manifest files. I built a simple RCP based
on the Hello RCP template with just one plugin. I could export it and it
worked just fine using Manifest files. The moment I added a second
plugin, which the first plugin required, to that RCP I could no longer
export the plugin or run it. I could still execute it with in the Eclipse
Framework using Run.

If this is a bug please let me know and I will fill out a bug report on
this.

Kevin
Re: ClassNotFound Exception{FIXED] [message #287762 is a reply to message #287759] Wed, 06 July 2005 20:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: chaves-do-not-spam.inf.ufsc.br

Kevin wrote:

> The moment I added a second
> plugin, which the first plugin required, to that RCP I could no longer
> export the plugin or run it. I could still execute it with in the Eclipse
> Framework using Run.

Where was the dependency between the first and second plug-in specified?
If it was done in the plugin.xml, that would explain it. Once you have a
MANIFEST.MF, the plugin.xml is used only for declaring extensions and
extension points. Any runtime-relate information is completely ignored.

Otherwise, if you have steps to recreate the original problematic
scenario, by all means report it on bugzilla.

Rafael
Re: ClassNotFound Exception{FIXED] [message #287809 is a reply to message #287762] Thu, 07 July 2005 08:17 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
Rafael Chaves wrote:
> Kevin wrote:
>
>> The moment I added a second plugin, which the first plugin required,
>> to that RCP I could no longer export the plugin or run it. I could
>> still execute it with in the Eclipse Framework using Run.
>
>
> Where was the dependency between the first and second plug-in specified?
> If it was done in the plugin.xml, that would explain it. Once you have a
> MANIFEST.MF, the plugin.xml is used only for declaring extensions and
> extension points. Any runtime-relate information is completely ignored.
>
> Otherwise, if you have steps to recreate the original problematic
> scenario, by all means report it on bugzilla.

I can at least report the same experiences (problems) with the new OSGI
plugin manifest. We are working in a team, which since two days used the
old pure plugin.xml manifest and our product export worked fine all the
time.
Now a collegue started the first time to add a new plugin using the new
(recommended) OSGI plugin manifest and we were not able to realize an
exported RCP which successfully runs - ClassNotFound or resolution
problems all the time!
It might be worth adding that we did not touch the plugin.xml directly
to express dependencies, but used the dependencies page for that.

Although it is a good idea to provide a conversion utility **to** the
new osgi manifest, at least a reverse conversion to the pure 3.0
plugin.xml would be great. I fear, we have to do the same thing as the
OP to convert the new osgi manifests to the pure plugin.xml format....

Greetings from Bremen,

Daniel Krügler
Re: ClassNotFound Exception{FIXED] [message #287842 is a reply to message #287809] Thu, 07 July 2005 14:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: chaves-do-not-spam.inf.ufsc.br

Note that all plug-ins end up having OSGi manifests (this was true even in
3.0). If you don't provide one, one will be automatically generated for
you during startup. There is no loss of functionality in doing that.

What may be occurring is that users are not familiar with the manifest
format (which is more complicated, because it is more powerful), so
mistakes tend to happen more often due to manual tweaking (not saying this
is your case).

Of course, it is not impossible that the tooling for composing or
generating manifests (which includes components from the OSGi runtime)
have issues. If you found any, please let the team know by reporting it on
Bugzilla.

Rafael

Daniel Krügler wrote:

> I can at least report the same experiences (problems) with the new OSGI
> plugin manifest. We are working in a team, which since two days used the
> old pure plugin.xml manifest and our product export worked fine all the
> time.
> Now a collegue started the first time to add a new plugin using the new
> (recommended) OSGI plugin manifest and we were not able to realize an
> exported RCP which successfully runs - ClassNotFound or resolution
> problems all the time!
> It might be worth adding that we did not touch the plugin.xml directly
> to express dependencies, but used the dependencies page for that.
>
> Although it is a good idea to provide a conversion utility **to** the
> new osgi manifest, at least a reverse conversion to the pure 3.0
> plugin.xml would be great. I fear, we have to do the same thing as the
> OP to convert the new osgi manifests to the pure plugin.xml format....

> Greetings from Bremen,

> Daniel Krügler
Re: ClassNotFound Exception{FIXED] [message #287846 is a reply to message #287842] Thu, 07 July 2005 14:26 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
Hello Rafael,

Rafael Chaves wrote:
> Note that all plug-ins end up having OSGi manifests (this was true even
> in 3.0). If you don't provide one, one will be automatically generated
> for you during startup. There is no loss of functionality in doing that.
>
> What may be occurring is that users are not familiar with the manifest
> format (which is more complicated, because it is more powerful), so
> mistakes tend to happen more often due to manual tweaking (not saying
> this is your case).

I can't tell for sure, whether there was manual tweaking. But it should
be easy to verify your hypothesis if I would now in which way the
automatically generated OSGi manifest looks like. Is this documented
somewhere?

Thanks,

Daniel
Re: ClassNotFound Exception{FIXED] [message #287860 is a reply to message #287846] Thu, 07 July 2005 15:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

It is not documented because the auto-generated ones are just placed in
an internal storage area not meant for general access. However, you can
look at them just so you see what is produced.

You should do this from a running binary Eclipse configuration, probably
one with your exported old style plugins. Look in the

eclipse\configuration\org.eclipse.osgi\manifests

directory. That is where they store the manifests for old style plugins.

Note: I would make sure that your old-style plugin is at least the 3.0
style (i.e. you use YourPlugin() constructor and start(BundleContext)
kind of plugins) and not have the older runtime.compatibility
requirement and YourPlugin(IPluginDescriptor) kind of plugin constructor.

--
Thanks,
Rich Kulp
Re: ClassNotFound Exception{FIXED] [message #287871 is a reply to message #287846] Thu, 07 July 2005 16:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: chaves-do-not-spam.inf.ufsc.br

The original (pre-3.0) plug-in manifest is described here:

http://help.eclipse.org/help31/topic/org.eclipse.platform.do c.isv/reference/misc/plugin_manifest.html

The Eclipse-specific MANIFEST.MF headers are described here:

http://help.eclipse.org/help31/topic/org.eclipse.platform.do c.isv/reference/misc/bundle_manifest.html

The OSGi spec is the source for the standard headers:

http://osgi.org/osgi_technology/download_specs2.asp?section= 2

Note that the OSGi Release 4 spec (on which Eclipse is based) is not yet
publicly available.

> I can't tell for sure, whether there was manual tweaking. But it should
> be easy to verify your hypothesis if I would now in which way the
> automatically generated OSGi manifest looks like. Is this documented
> somewhere?

Besides Rich's suggestion, you can easily see what they look like by
converting an existing old-style plugin.xml (there is an action on the
Plug-in Manifest Editor Overview page that does that).

Rafael
Re: ClassNotFound Exception{FIXED] [message #287993 is a reply to message #287871] Mon, 11 July 2005 09:25 Go to previous message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
Hello Rafael Chaves and Rich Kulp,

thank you very much for your efforts. Taking your proposals into account
I finally found the differences and thus the missing entries by
comparison with the mentioned generated manifest files.

Interestingly in the corresponding manifest files the
Bundle-ClassPath entry was completely missing. In the moment I can't say
whether this was explicitly done by the programer or simply was the
default setting.

Luckily export now works!

Daniel
Previous Topic:build pde plugin and binaries with linked content
Next Topic:Way to show Project Name in file editor
Goto Forum:
  


Current Time: Sun Oct 06 16:23:20 GMT 2024

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

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

Back to the top