Pages

Tuesday, January 15, 2013

Headless RCP - issue using other plugins

Issues and Solutions

Most of the issues you encounter when you work with headless RCP is highly likely with the “additial plug-ins”.

Missing constraints

Theoretically, if you have run your RCP in IDE, it should run as standalone without a problem. If you have some issues such as “Missing constraints” You can use this site.

http://stackoverflow.com/questions/14366421/the-bundle-xyz-could-not-resolved-reason-missing-constraint-import-package-a/14367997#14367997

Unbound class path container error

You get this error because your java library is wrongly setup.

Go to Add Library session in Build Path/Configure Build Path and set from “Execution environment” to “Workspace …”.

ScreenShot2013-01-16at11.54.58AM-2013-01-15-15-57.png

http://stackoverflow.com/questions/6798281/unbound-class-path-container-error-in-eclipse

IllegalStateException: “Workbench has not been created yet”

This error message is misleading, and it actually means “there is some race condition happening”.

You can solve this issue by

  1. add -clean option to the parameter
  2. Following the “NoClassFoundError case 1”, that is remove all the dependencies and add them again. When you just keep adding dependencies for whatever reasons you may end up this state.

http://waheedtechblog.blogspot.com/2011/11/javalangillegalstateexception-workbench.html

NoClassFoundError case 1

You add this, and that, and suddenly you got an error “NoClassFound”, what you can do is go to the product file, open the Dependencies. Delete all the plug-ins using “Remove” and “Add Required plug-ins” with the application that you are going to make standalone

NoClassFoundError case 2

You successfully created the plugin (utilities for example), but you may have this kind of error “NoClassDefFoundError”, when you execute the plugin that contains other plugin.

ScreenShot2013-01-15at3.56.41PM-2013-01-15-15-57.png

First thing you need to understand is that reference is built up already for you.

Lets’s say in the course of plugin development, you add “utilities” in “Dependencies”.

ScreenShot2013-01-15at4.03.34PM-2013-01-15-15-57.png

It makes your plugin know how to refer to the utilities during its build, as it finds the utilities, it can build the plugin successfully.

ScreenShot2013-01-15at4.02.43PM-2013-01-15-15-57.png

The issue is actually not in the user’s side, but in the provider’s side. You had to export the package in the “utilities” plugin.

ScreenShot2013-01-15at4.01.14PM-2013-01-15-15-57.png

ScreenShot2013-01-15at4.01.24PM-2013-01-15-15-57.png