Equinox hooks removed in Luna [message #1442031] |
Fri, 10 October 2014 10:20  |
Eclipse User |
|
|
|
hello,
we are migrating from Eclipse 3.6 to E4.4 (yes..., I know).
We have implemented an equinox hook (org.eclipse.osgi.baseadaptor.hooks.ClassLoadingHook) to override the inner jar class loading mechanism to use jars outside the bundle in our own jar libraries manager (a maven like repo).
but reading this (and noticing it cause it does not compile anymore), the old equinox hooks have been removed.
I am not sure that I can achieve what I want with the OSGI hooks and this page mentioned above does not give any pointer.
does anyone have an idea on how to acheive my goal with the OSGI hooks ?
Is the org.osgi.framework.hooks.resolver.ResolverHook this right one ?
Thanks for any hints.
SeB.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Equinox hooks removed in Luna [message #1444782 is a reply to message #1444705] |
Tue, 14 October 2014 10:47   |
Eclipse User |
|
|
|
Ok I got it.
I have another problem.
In 3.6, the hook was called when the one of the class or resource was being loaded in the inner jar, or I just discovered that in 4.4 that my hook gets called during some early OSGI initialization phase, where it is looking for some i18n resource : OSGI-INF/l10n/bundle.properties .
The thing is that I really need to know in my hook that it is called from our actual code activation and not some internal resolution ?
My hook eventually ask the user to accept some license before downloading the library and should therefore be delayed when the actual inner jar is needed to be used.
I have tried to create the searched file (OSGI-INF/l10n/bundle.properties) but the hook gets called anyway.
Do you have any idea ?
Thanks.
here is the stack trace
org.talend.osgi.hook.JarLoaderClassLoadingHook.addClassPathEntry(java.util.ArrayList<org.eclipse.osgi.internal.loader.classpath.ClasspathEntry>, java.lang.String, org.eclipse.osgi.internal.loader.classpath.ClasspathManager, org.eclipse.osgi.storage.BundleInfo.Generation) line: 92
org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassPathEntry(java.util.ArrayList<org.eclipse.osgi.internal.loader.classpath.ClasspathEntry>, java.lang.String, org.eclipse.osgi.internal.loader.classpath.ClasspathManager, org.eclipse.osgi.storage.BundleInfo.Generation) line: 173
org.eclipse.osgi.internal.loader.classpath.ClasspathManager.buildClasspath(java.lang.String[], org.eclipse.osgi.internal.loader.classpath.ClasspathManager, org.eclipse.osgi.storage.BundleInfo$Generation) line: 154
org.eclipse.osgi.internal.loader.classpath.ClasspathManager.<init>(org.eclipse.osgi.storage.BundleInfo$Generation, org.eclipse.osgi.internal.loader.ModuleClassLoader) line: 83
org.eclipse.osgi.internal.loader.EquinoxClassLoader.<init>(java.lang.ClassLoader, org.eclipse.osgi.internal.framework.EquinoxConfiguration, org.eclipse.osgi.internal.loader.BundleLoader, org.eclipse.osgi.storage.BundleInfo$Generation) line: 57
org.eclipse.osgi.internal.loader.BundleLoader.createClassLoaderPrivledged(java.lang.ClassLoader, org.eclipse.osgi.internal.framework.EquinoxConfiguration, org.eclipse.osgi.internal.loader.BundleLoader, org.eclipse.osgi.storage.BundleInfo.Generation, java.util.List<org.eclipse.osgi.internal.hookregistry.ClassLoaderHook>) line: 268
org.eclipse.osgi.internal.loader.BundleLoader.getModuleClassLoader() line: 225
org.eclipse.osgi.internal.loader.BundleLoader.findEntries(java.lang.String, java.lang.String, int) line: 761
org.eclipse.osgi.container.ModuleWiring.findEntries(java.lang.String, java.lang.String, int) line: 285
org.eclipse.osgi.storage.ManifestLocalization.findResource(java.lang.String) line: 183
org.eclipse.osgi.storage.ManifestLocalization.lookupResourceBundle(java.lang.String) line: 126
org.eclipse.osgi.storage.ManifestLocalization.getResourceBundle(java.lang.String, boolean) line: 102
org.eclipse.osgi.storage.BundleInfo$Generation.getResourceBundle(java.lang.String) line: 133
org.eclipse.osgi.storage.BundleLocalizationImpl.getLocalization(org.osgi.framework.Bundle, java.lang.String) line: 40
org.eclipse.core.internal.runtime.Activator.getLocalization(org.osgi.framework.Bundle, java.lang.String) line: 241
org.eclipse.core.internal.runtime.ResourceTranslator.getResourceBundle(org.osgi.framework.Bundle, java.lang.String) line: 69
org.eclipse.core.internal.runtime.ResourceTranslator.getResourceBundle(org.osgi.framework.Bundle) line: 61
org.eclipse.core.internal.registry.osgi.EclipseBundleListener.addBundle(org.osgi.framework.Bundle, boolean) line: 174
org.eclipse.core.internal.registry.osgi.EclipseBundleListener.processBundles(org.osgi.framework.Bundle[]) line: 90
org.eclipse.core.internal.registry.osgi.EquinoxRegistryStrategy(org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI).onStart(org.eclipse.core.runtime.IExtensionRegistry, boolean) line: 224
org.eclipse.core.internal.registry.ExtensionRegistry.<init>(org.eclipse.core.runtime.spi.RegistryStrategy, java.lang.Object, java.lang.Object) line: 725
org.eclipse.core.runtime.RegistryFactory.createRegistry(org.eclipse.core.runtime.spi.RegistryStrategy, java.lang.Object, java.lang.Object) line: 58
org.eclipse.core.internal.registry.osgi.Activator.startRegistry() line: 137
org.eclipse.core.internal.registry.osgi.Activator.start(org.osgi.framework.BundleContext) line: 56
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09702 seconds