Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I solve ClassNotFoundException in a eclipse rcp build?

Tags:

eclipse-juno

I have build an eclipse feature project in eclipse juno and when I launch the program from the IDE everything is fine, no errors in the console.

When I export the product it runs but it does not show the content of the parts that I created in the Application.e4xmi file (only a grey background). When I check the configuration folder in the exported folder there is a log file with following errors:

!ENTRY org.eclipse.e4.ui.workbench 4 0 2012-07-19 19:22:13.859
MESSAGE Unable to load class 'be.yt.diepvriezer.ui.handlers.ExitHandler' from bundle '2'

!ENTRY org.eclipse.e4.ui.workbench 4 0 2012-07-19 19:22:13.859 !MESSAGE Unable to load class 'be.yt.diepvriezer.ui.handlers.ExitHandler' from bundle '2' !STACK 0 java.lang.ClassNotFoundException: be.yt.diepvriezer.ui.handlers.ExitHandler at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) .....

And so on for every handler and part that I created in the application model.

I checked the build.properties and manifest files and everything is there.

Can somebody point me in the right direction how to solve this problem please ?

like image 578
Yves_T Avatar asked Apr 13 '26 01:04

Yves_T


1 Answers

Sometimes you need to launch the app with "-clean", or define "osgi.clean=true" to make sure you clear cached dependencies. Launching in a clean workspace will have the same effect (no cached values):

"any cached data used by the OSGi framework and eclipse runtime will be wiped clean. This will clean the caches used to store bundle dependency resolution and eclipse extension registry data. Using this option will force eclipse to reinitialize these caches."

More info here.

like image 107
p2r Avatar answered Apr 21 '26 03:04

p2r



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!