RCP: NotHandledException and possibly cached command handlers in workspace folders?

StackOverflow https://stackoverflow.com/questions/21406867

  •  03-10-2022
  •  | 
  •  

Question

I found a strange error about a missing command handler in our application when installing a newer release for our customer:

org.eclipse.core.commands.NotHandledException: There is no handler to execute for command ...

I checked the plugins and everything else and found that the handler is actually there, activated, visible, etc. Now the strange thing: the error can be solved by deleting the user's workspace folders (in addition to the runtime folders that happens when starting with -clean). But I cannot find anything related to the commands or handlers. There is a lot of data about column orders, windows sizes and so on, so I can't just wipe these data away for production.

What cached data may cause this effect?

We're stuck to RCP 3.4 right now.

Was it helpful?

Solution 2

I found that the issue can be solved by removing the file .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs from the workspace.

The file contains perspective IDs as keys, and a XML structure as values. Removing a single line of this file that refers to a perspective solves the problem for that perspective.

I noticed that the perspectives were referenced by their short name (without the package) before, and with their fully qualified name after the new release. So there must be some side-effect when using the old prefs causing the handlers do not work anymore.

OTHER TIPS

The only information about handlers would be in the plugin configuration in the application configuration folder, but a -clean start should rebuild this information. There is no information about handlers in the actual workspace folders.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top