简体   繁体   中英

Eclipse e4 RCP application fails to start with “Unable to retrieve the bundle from the URI” error

When attempted to start an Eclipse e4 RCP application that I'm developing the following error message is displayed...

!ENTRY org.eclipse.e4.ui.workbench 4 0 2018-05-05 14:01:24.060
!MESSAGE Unable to retrieve the bundle from the URI: bundleclass://com.mycompany.myapp/com.mycompany.myapp.demo.DemoPart

I think that the problem might be caused by a plugin which isn't defined in the feature.xml file, however I can't figure out which plugin is missing. Using the "Show the plug-in dependency hierarchy" function under the "Dependency Analysis" section of the plugin's MANIFEST.MF file, I've included all of the plugin dependencies in the feature.xml file.

The product is based on features and is comprised of plugins which I've developed and 3rd party dependencies which are pulled in from Eclipse Orbit. The application is currently being started using the product file in Eclipse.

My questions are...

  1. Is it possible to get a more verbose error message from the Eclipse RCP application which would indicate the cause of the problem?
  2. Are there any other troubleshooting steps I can take to get the cause of the the problem?
  3. Assuming that problem is caused by a missing plugin, is it possible to identify which plugin is actually missing?

The solution is to use the OSGI console to establish why the bundle can't be loaded. This requires a number of steps:

  1. Add the argument -console 5555 to the product file launch arguments
  2. Connect to the console using either telnet on port 5555 or the console view in the Eclipse IDE
  3. Find the bundle ID using the command ss <xxx> where <xxxx> is the name of the bundle that won't load or alternatively just use the command ss and find the bundle in the list
  4. Run the command diag <bundle-id> where <bundle-id> is the ID obtained from the previous step. This should indicate why the bundle failed
  5. If the problem is due to a missing dependency, look for one or more entries with the text Unresolved requirement and the missing plugins to the feature.xml file

It might be necessary to repeat steps 2 to 5 multiple times to find all the missing dependencies.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM