Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse RCP: How to troubleshoot plugin dependencies & classpath problems?

I am working on an RCP project based on eclipse. It has been working fine but recently I thought I'd upgrade it to use a new eclipse version (3.2 -> 3.5).

After a bit of trouble, it was running on the new platform. Then I did something. Don't know what. The end result is that I'm now getting a classpath error when one of my plugins (A) tries to access a class in one of the dependent plugins (B) (also one of mine).

As far as I can see, Plugin A has Plugin B in its' dependency list and the compiler shows no errors. To test, I created a new Plugin C with one class and accessed the class from Plugin A. That works fine.

Does anyone have any hints for troubleshooting such issues? A checklist of settings to check? I've been struggling with this for hours and getting nowhere! Particularly frustrating as it was working until I changed something!

Thanks

Update

I should also say that the project is quite old and uses the plugin.xml and not the manifest. Could this be a problem? Is there a way to upgrade?

like image 471
paul Avatar asked Dec 27 '25 16:12

paul


2 Answers

Some ideas:

  • Clean-and-build every project (maybe after a restart of Eclipse)
  • Check, whether the required packages are also exported
  • Check the Error log, maybe there is some unloadable plug-in, etc.
  • Check the Run configuration, whether every required plug-in is present there
  • If the problem does not happen in a Runtime workbench, but in an Exported RCP app, then check whether you compile the project with the same settings during export than in Eclipse

I hope, something helps about these.

like image 156
Zoltán Ujhelyi Avatar answered Dec 30 '25 05:12

Zoltán Ujhelyi


You can try the following in your run configuration:

  1. In the Main tab check Clear (workspace) under Workspace Data
  2. In the Configuration tab check clear the configuration area before launching under Configuration Area

This helps me every time I encounter some strange ClassNotFound errors.

like image 20
TimPietrusky Avatar answered Dec 30 '25 06:12

TimPietrusky



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!