Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Preventing 5000ms classloading timeout
Preventing 5000ms classloading timeout [message #986161] Mon, 19 November 2012 09:17 Go to next message
Heiko  Böttger is currently offline Heiko BöttgerFriend
Messages: 4
Registered: July 2009
Junior Member
I am currently faced with the problem that one of our companies plugin consumes to much time in the activator. Actualy it needs to read a lot of file from the project and builds an index to perform fast queries. Since the whole application is designed to always have all data in memory, it is very difficult to delay this initialization. If I do this, I have to touch every action/command/editor/view to support some kind of "wait for initialization to finish" reporting, similar as it is done when saving a file in jdt while workspace is locked.

One solution I have found is setting the "equinox.statechange.timeout" config.ini to a higher value. However I haven't found a solution to increase this value during plugin-installation. Is this possible or do I have to create my own touchpoint?

May be there is a better solution for this, any other ideas?


The following stacktrace comes from the attached demo project and shows that the problem may be caused by any plugin loading an extension requiring a class from a "blocked" plugin:

org.osgi.framework.BundleException: State change in progress for bundle "reference:file:/D:/work/daten/eclipse/workspaceTest/ch.actifsource.demo.osgiTimeoutBlocking/" by thread "Thread-2".
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1087)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:297)
	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
	at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:268)
	at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:463)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:345)
	at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1207)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
	at ch.actifsource.demo.osgitimeoutbase.Activator$1.run(Activator.java:29)
	at java.lang.Thread.run(Thread.java:662)
	at ch.actifsource.demo.osgitimeoutbase.Activator$2.run(Activator.java:51)
Caused by: org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException
	... 23 more
Root exception:
org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1087)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:297)
	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
	at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:268)
	at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:463)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:345)
	at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1207)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
	at ch.actifsource.demo.osgitimeoutbase.Activator$1.run(Activator.java:29)
	at java.lang.Thread.run(Thread.java:662)
	at ch.actifsource.demo.osgitimeoutbase.Activator$2.run(Activator.java:51)
Re: Preventing 5000ms classloading timeout [message #986719 is a reply to message #986161] Wed, 21 November 2012 12:50 Go to previous message
Heiko  Böttger is currently offline Heiko BöttgerFriend
Messages: 4
Registered: July 2009
Junior Member
I the meantime I have found at lease a way to set the value via p2.inf.

http://dev.eclipse.org/mhonarc/lists/equinox-dev/msg06823.html

Just put a p2.inf at the same directory as the feature.xml and add the following line:

instructions.configure = \
org.eclipse.equinox.p2.touchpoint.eclipse.setProgramProperty(propName:equinox.statechange.timeout,propValue:30000);

However I am not really satified with this solution. It would be much nicer if there where at least a hook for the Splash-Screen or something similar to give feedback about the loading progress.
Previous Topic:OSX: use bundled JRE
Next Topic:OSGi bundles for java & non-java 3PP's
Goto Forum:
  


Current Time: Fri Apr 19 15:43:36 GMT 2024

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

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

Back to the top