Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » InvalidRegistryObjectException
InvalidRegistryObjectException [message #516358] Tue, 23 February 2010 17:11
Xavier Maysonnave is currently offline Xavier MaysonnaveFriend
Messages: 30
Registered: July 2009
Member
Hi,

To day I got this exception on Eclipse Modeling 3.5.1

org.eclipse.core.runtime.InvalidRegistryObjectException: Invalid
registry object
at
org.eclipse.core.internal.registry.TemporaryObjectManager.ge tObject(TemporaryObjectManager.java:98)
at
org.eclipse.core.internal.registry.BaseExtensionPointHandle. getExtensionPoint(BaseExtensionPointHandle.java:98)
at
org.eclipse.core.internal.registry.BaseExtensionPointHandle. getUniqueIdentifier(BaseExtensionPointHandle.java:90)
at
org.eclipse.emf.ecore.plugin.RegistryReader$1.registryChange d(RegistryReader.java:106)
at
org.eclipse.core.internal.registry.ExtensionRegistry$2.run(E xtensionRegistry.java:891)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.internal.registry.ExtensionRegistry.process ChangeEvent(ExtensionRegistry.java:889)
at
org.eclipse.core.runtime.spi.RegistryStrategy.processChangeE vent(RegistryStrategy.java:267)
at
org.eclipse.core.internal.registry.osgi.ExtensionEventDispat cherJob.run(ExtensionEventDispatcherJob.java:50)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

As you can notice there is a registry listener on EMF who listen the
registry. As far as I debugged, the extension is not valid in this code.
However I'm responsible of such behaviour as I'm playing with dynamic
bundle. Here is where I'm.
I uninstall a bundle with bundle.uninstall() then I take the
PackageAdmin osgi service to refreshPackages of such bundle.
I tried various scenario to understand what's going on and I noticed the
following. The exception occur when I try to refreshPackages.
However while debugging I noticed that no crash occured. (some race
condition somewhere then) I also tried between the uninstall and the
resfresh a Thread.sleep(1000) and one again no problem at all.

Could you provide some guidance to have a better understanding and why
not a fix for such exception ?

Cheers.
Re: InvalidRegistryObjectException [message #516405 is a reply to message #516358] Tue, 23 February 2010 15:46 Go to previous message
Oleg Besedin is currently offline Oleg BesedinFriend
Messages: 41
Registered: July 2009
Member
This exception typically occurs when some code caches IExtensionPoint /
IExtension / IConfigurationElement. Those are handles for internal registry
objects. When bundle that contained, say, IExtension, is removed, such
IExtension becomes invalid. An attempt to use such invalid handle produces
the exception.

To avoid this, either don't cache handles to registry objects, or create a
listener on registry events and process them to remove invalid handles from
the local cache.

Sincerely,
Oleg Besedin


"Xavier Maysonnave" <xavier.maysonnave@soyatec.com> wrote in message
news:hm1280$cnd$1@build.eclipse.org...
> Hi,
>
> To day I got this exception on Eclipse Modeling 3.5.1
>
> org.eclipse.core.runtime.InvalidRegistryObjectException: Invalid registry
> object
> at
> org.eclipse.core.internal.registry.TemporaryObjectManager.ge tObject(TemporaryObjectManager.java:98)
> at
> org.eclipse.core.internal.registry.BaseExtensionPointHandle. getExtensionPoint(BaseExtensionPointHandle.java:98)
> at
> org.eclipse.core.internal.registry.BaseExtensionPointHandle. getUniqueIdentifier(BaseExtensionPointHandle.java:90)
> at
> org.eclipse.emf.ecore.plugin.RegistryReader$1.registryChange d(RegistryReader.java:106)
> at
> org.eclipse.core.internal.registry.ExtensionRegistry$2.run(E xtensionRegistry.java:891)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at
> org.eclipse.core.internal.registry.ExtensionRegistry.process ChangeEvent(ExtensionRegistry.java:889)
> at
> org.eclipse.core.runtime.spi.RegistryStrategy.processChangeE vent(RegistryStrategy.java:267)
> at
> org.eclipse.core.internal.registry.osgi.ExtensionEventDispat cherJob.run(ExtensionEventDispatcherJob.java:50)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>
> As you can notice there is a registry listener on EMF who listen the
> registry. As far as I debugged, the extension is not valid in this code.
> However I'm responsible of such behaviour as I'm playing with dynamic
> bundle. Here is where I'm.
> I uninstall a bundle with bundle.uninstall() then I take the PackageAdmin
> osgi service to refreshPackages of such bundle.
> I tried various scenario to understand what's going on and I noticed the
> following. The exception occur when I try to refreshPackages.
> However while debugging I noticed that no crash occured. (some race
> condition somewhere then) I also tried between the uninstall and the
> resfresh a Thread.sleep(1000) and one again no problem at all.
>
> Could you provide some guidance to have a better understanding and why not
> a fix for such exception ?
>
> Cheers.
Previous Topic:Helios: Features missing from our update site
Next Topic:Error when exporting product: "Invalid action syntax"
Goto Forum:
  


Current Time: Tue Apr 16 17:04:59 GMT 2024

Powered by FUDForum. Page generated in 0.67120 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top