Why Eclipse components sometimes don’t show up in composite applications

Sometimes when implementing composite applications the Eclipse components don’t come up correctly when the applications are opened in Lotus Notes. In this blog entry I describe why this can happen.

This screenshot shows that the Eclipse component doesn’t come up:

In order to find out more details the blue link can be clicked to view the diagnostic report:

There are four ‘expected’ errors that can occur:

1. Assemblers typed in manually the feature name, view part name and/or the update site URL in CAE and they used wrong names. In this case check these names in the CAE.

2. The update site is not available when the application is opened in Lotus Notes. In this case try again once the update site is running again.

3. Eclipse components might now show up after provisioning before you restart. In this case restart the client.

4. Dependency (a dependent other Eclipse feature) does exist on the client. This can happen since Eclipse doesn’t resolve all dependencies automatically. Instead you need to define all features your Eclipse component needs in the CAE (not only the one feature the view part is in). Here are details:

Typically the majority of simple Eclipse components will employ a single Eclipse feature and the CAE will detect that required feature when the component is added to the palette from an update site. The sample image below shows a simple view configured with a single feature.

With more complex components that have multiple features it is a requirement to configure the component after it has been added to the CAE palette. Use the advanced component properties to list the additional dependant features using  an underscore and incrementing digits postfixed to the id.feature, match.feature and version.feature property names. The sample below shows a configured two feature component.

In order to find out whether an Eclipse component is missing you can use the console.
The diag command lets you check whether dependencies are there:
osgi> diag com.ibm.cademo.util.comp.nav
update@../../../Data/workspace/applications/eclipse/plugins/com.ibm.cademo.util.
comp.nav_8.1.20080530.jar 1427
  Direct constraints which are unresolved:
    Missing imported package com.ibm.rcp.topologyhandler_0.0.0.

No other errors are expected which is why there are no suggestions to how to solve other errors if they occurred. But in the unlikely case that your Notes configuration is not correct, you might want to try to reinstall the app. To do this open the Portal Applications catalog (which includes also NSF based apps) and use the actions to uninstall and reinstall apps.

In addition to the runtime errors Eclipse components also don’t come up in CAE in one scenario: If the user has been editing the app, CAE can tell CAI provisioning to continue without a restart when installing a new feature.  This is a convenience, since it allows the end user to continue editing without restarting.  But, a side effect of this is that any part of the app that requires a restart will display the “not available” message.