[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: intermittent NoClassDefFoundError

thanks for replying Jens.

In my case, I'd think that wouldn't be the problem because the problem I'm having is with org.apache.commons...., and I don't believe any of that is in the jdk. Maybe I'm wrong on that?

thanks.

Marc


"Jens Rutschmann" <Jens.Rutschmann@xxxxxxxx> wrote in message news:gc2j5j$k08$1@xxxxxxxxxxxxxxxxxxxx
Marc E wrote on 01.10.2008 02:41:
Jens, it does sound similar. I saw that before posting my problem but notice you still haven't gotten any responses. Hopefully something will turn up.

Ok,
I found something out: The "Export-Package" directive in MANIFEST.MF seems to mask packages from the JDK.



In other words:
The plugin that I created for the xmlbeans distribution JARs contains in its "Export-Package" directive the package "org.w3c.dom" because xmlbeans provides some classes in this package.


The JDK contains the same package, although in the JDK other classes are in the package.

Apparently the Eclipse classloader only provides the classes that are contained in the plugin's package "org.w3c.dom", but not those from the JDK's "org.w3c.dom" package.

So I removed the entry from the export directive, hoping that no dependent plugin would require the classes from those package. Now the application runs, but I don't think it's a clean solution.


Perhaps in your case it depends on the order that plugins are being loaded whether the missing class can be found or not? Just an idea ...


Probably others reading this newsgroup know more about that. Would be especially interesting to know if that "masking" effect can be disabled.


I hope this helps you somehow,
Jens