[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] What causes InvalidRegistryObjectException ?

Context: eclipse 3.2.1

Goal: track the ExtensionRegistry and maintain a list of available views '
with a fixed prefix for the ViewID.

Error: I am getting an InvalidRegistryObjectException when I uninstall a
fragment. The fragment (specifically fragmentBundle.jar below) contributes a
ViewPart. It doesn't happen the first time the bundle is uninstalled

e.g. the sequence of events in the OSGi console:

1) install fragmentBundle.jar
2) refresh 51 (51 is fragmentBundle.jar in INSTALLED state)
3) uninstall 51
4) install fragmentBundle.jar
5) refresh 52 (52 is fragmentBundle.jar in INSTALLED state)

At this point my IPlatformRunnable bombs with a dialog that reads:

    Unable to load perspective.
    Reason: premature end of file.

And my log file contains the following exception:

!ENTRY org.eclipse.ui 4 0 2007-04-06 15:44:32.718
!MESSAGE Failed to execute runnable
(org.eclipse.core.runtime.InvalidRegistryObjectException: Invalid registry 
   object)
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable
(org.eclipse.core.runtime.InvalidRegistryObjectException: 
    Invalid registry object)
at org.eclipse.swt.SWT.error(SWT.java:3374)
at org.eclipse.swt.SWT.error(SWT.java:3297)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:126)
   at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3325)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971)
   at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
   at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
   at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
   at foo.myapp.Application.run(Application.java:72)

Caused by: org.eclipse.core.runtime.InvalidRegistryObjectException: Invalid
registry object 
at
org.eclipse.core.internal.registry.RegistryObjectManager.
    basicGetObject(RegistryObjectManager.java:271)
at
org.eclipse.core.internal.registry.RegistryObjectManager.
    getObject(RegistryObjectManager.java:261)
at
org.eclipse.core.internal.registry.ConfigurationElementHandle.
    getConfigurationElement(ConfigurationElementHandle.java:26)
                                                                               
   at 
org.eclipse.core.internal.registry.ConfigurationElementHandle.
   getAttribute(ConfigurationElementHandle.java:34)
   at
org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.
   toString(ActionDelegateHandlerProxy.java:565)
   at java.lang.String.valueOf(String.java:2615)                       
at
java.lang.StringBuffer.append(StringBuffer.java:220)                           
      at
org.eclipse.ui.internal.handlers.HandlerActivation.toString
    (HandlerActivation.java:185)

     at java.lang.String.valueOf(String.java:2615)     
                                                                     
     at java.lang.StringBuffer.append(StringBuffer.java:220) 
at
org.eclipse.ui.internal.handlers.HandlerAuthority.
    resolveConflicts(HandlerAuthority.java:307)
                       at
org.eclipse.ui.internal.handlers.HandlerAuthority.
    activateHandler(HandlerAuthority.java:153)
                        at
org.eclipse.ui.internal.handlers.HandlerService.
    activateHandler(HandlerService.java:93)
                             at
org.eclipse.ui.internal.handlers.SlaveHandlerService.
     doActivation(SlaveHandlerService.java:237)
                     at
org.eclipse.ui.internal.handlers.SlaveHandlerService.
     activateHandler(SlaveHandlerService.java:136)
                  at
org.eclipse.ui.internal.menus.LegacyActionPersistence.
    convertActionToHandler(LegacyActionPersistence.java:580)
      at
org.eclipse.ui.internal.menus.LegacyActionPersistence.
    readActions(LegacyActionPersistence.java:908)
                 at
org.eclipse.ui.internal.menus.LegacyActionPersistence.
      readActionsAndMenus(LegacyActionPersistence.java:974)
         at
org.eclipse.ui.internal.menus.LegacyActionPersistence.
    readObjectContributions(LegacyActionPersistence.java:1431)
    at
org.eclipse.ui.internal.menus.LegacyActionPersistence.
    read(LegacyActionPersistence.java:843)
                        at
org.eclipse.ui.internal.services.RegistryPersistence$3.
    run(RegistryPersistence.java:598)
                            at
org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)                 
                                     at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)   
                                 
org.eclipse.core.runtime.InvalidRegistryObjectException: 
   Invalid registry object
    at
org.eclipse.core.internal.registry.RegistryObjectManager.
basicGetObject(RegistryObjectManager.java:271)
    at
org.eclipse.core.internal.registry.RegistryObjectManager.
getObject(RegistryObjectManager.java:261)
    at
org.eclipse.core.internal.registry.ConfigurationElementHandle.
getConfigurationElement(ConfigurationElementHandle.
java:26)
    at
org.eclipse.core.internal.registry.ConfigurationElementHandle.
getAttribute(ConfigurationElementHandle.java:34)
at
org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.
toString(ActionDelegateHandlerProxy.java:565)
at java.lang.String.valueOf(String.java:2615)

Any ideas why this is happening ?

Thanks

G