You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by an...@orange-ftgroup.com on 2009/09/08 17:37:41 UTC

RE : All my bundles start with the same classloader.

imho you are printing the ClassLoader for the org.osgi.Bundle class, which is (as expected) the same for each bundle.

try to print the classloader of a class that belongs to the bundle  (either belonging to an exported or internal package)

Anne

-------- Message d'origine--------
De: Angel Electrico [mailto:aforums@psiqueware.com]
Date: mar. 08/09/2009 17:28
À: users@felix.apache.org
Objet : All my bundles start with the same classloader.
 

My first post was about finding some troubles with duplicated dependencies
when programatically installing several bundles.

http://www.nabble.com/BundleContext.installBundle-won%27t-install-more-than-2-bundles.-td25280408.html

I removed the duplicated dependencies and all my bundles started ok... but
know I realize that the issue is that all my bundles are starting with the
same classloader.

The output from my pluggins shows the same classloader over and over
again...

Installer code
if (s_log.isDebugEnabled()) s_log.debug("(" +
Thread.currentThread().getContextClassLoader() + ") Starting Pluggins: " +
extensiones);
if (s_log.isDebugEnabled()) s_log.debug("Install: " + url + "  (" +
bundle.getSymbolicName() + "). " + bundle.getClass().getClassLoader());
if (s_log.isDebugEnabled()) s_log.debug("(" +
Thread.currentThread().getContextClassLoader() + ") Starting " +
bundleInstalado.getBundle().getSymbolicName() + " loader " +
bundleInstalado.getBundle().getClass().getClassLoader());

Pluggin Code
if (s_log.isDebugEnabled()) s_log.debug("Loader: " +
Thread.currentThread().getContextClassLoader());
if (s_log.isDebugEnabled()) s_log.debug("JTattoo says hi");

(Classloader 1.0) Starting pluggins

Install:
file:/C:/Users/Psique/.PsiqueWareOrquideaSimpodial/girasolEditor1252248327408/jtattoo-pluggin.jar 
(JTattooPluggin). com.sun.jnlp.JNLPClassLoader@a6aeed
(Classloader 1.0) Starting JTattooPluggin loader
com.sun.jnlp.JNLPClassLoader@a6aeed
Loader: 1.0
JTattoo says hi

Install:
file:/C:/Users/Psique/.PsiqueWareOrquideaSimpodial/girasolEditor1252248327408/wordpress-pluggin.jar 
(WordPressPluggin). com.sun.jnlp.JNLPClassLoader@a6aeed
(Classloader 1.0) Starting WordPressPluggin loader
com.sun.jnlp.JNLPClassLoader@a6aeed
Loader: 1.0
WordPress says hi

Install:
file:/C:/Users/Psique/.PsiqueWareOrquideaSimpodial/girasolEditor1252248327408/napkin-pluggin.jar 
(NapkinPluggin). com.sun.jnlp.JNLPClassLoader@a6aeed
(Classloader 1.0) Starting NapkinPluggin loader
com.sun.jnlp.JNLPClassLoader@a6aeed
Loader: 1.0
Napkin says hi

Does anyone has any idea on why is this happening or how can I fix it o at
least have better diagnostics on it :-/.

Thank you very much :-D
-- 
View this message in context: http://www.nabble.com/All-my-bundles-start-with-the-same-classloader.-tp25348461p25348461.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org