I'm comming late into this thread and don't see the whole problem here, but beyond what Brennan suggested this also works for me:
this.getClass().getProtectionDomain().getCodeSource().getLocation()); Where 'this' could be any object reference. Also, don't forget the happy axis page shows the jar locations of everything loaded. HTH, Robert On 10/26/07, João Luís Pinto <[EMAIL PROTECTED]> wrote: > Hi, > > <code> > log1.debug("Loading " + url); //$NON-NLS-1$ > > ClassLoader loader = > AgentPlatformServiceMessageReceiverInOut.class.getClassLoader(); > if (loader != null) > { > log1.debug("AgentPlatformServiceMessageReceiverInOut: " //$NON-NLS-1$ > + loader.getClass().getName()); > getParents("AgentPlatformServiceMessageReceiverInOut", loader); > //$NON-NLS-1$ > } > > loader = Digester.class.getClassLoader(); > if (loader != null) > { > log1.debug("Digester: " //$NON-NLS-1$ > + loader.getClass().getName()); > getParents("Digester", loader); //$NON-NLS-1$ > } > > loader = CatalogBase.class.getClassLoader(); > if (loader != null) > { > log1.debug("CatalogBase: " //$NON-NLS-1$ > + loader.getClass().getName()); > getParents("CatalogBase", loader); //$NON-NLS-1$ > } > > configParser.parse(url); > </code> > > <code> > private void getParents(String string, ClassLoader loader) > { > ClassLoader classLoader = loader; > while ((classLoader = classLoader.getParent()) != null) > { > log1.debug("Parent(" + string + "): " + > loader.getClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$ > } > } > </code> > > On 10/26/07, Brennan Spies <[EMAIL PROTECTED]> wrote: > > 1) Create a simple utility method that recurses up the classloading tree > > using ClassLoader.getParent()--stop when you get a null from this method. > > Print out the class name of each ClassLoader. > > 2) Also print out the class name of each ClassLoader for the classes of > > interest: Digester, CatalogBase (the impl version), ConfigCatalogRule, > > AgentPlatformServiceMessageReceiverInOut. Don't create a new instance; use a > > static reference to the class like > > 'ConfigCatalogRule.class.getClassLoader()'. To be thorough, you should check > > to see if this is null before doing getClass().getName(). > > I get: > > [DEBUG] Loading > file:/Users/jpinto/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Axis2/WEB-INF/services/AgentPlatformService/chain-config.xml > [DEBUG] AgentPlatformServiceMessageReceiverInOut: java.net.URLClassLoader > [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut): > java.net.URLClassLoader > [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut): > java.net.URLClassLoader > [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut): > java.net.URLClassLoader > [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut): > java.net.URLClassLoader > [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut): > java.net.URLClassLoader > [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut): > java.net.URLClassLoader > [DEBUG] Digester: java.net.URLClassLoader > [DEBUG] Parent(Digester): java.net.URLClassLoader > [DEBUG] Parent(Digester): java.net.URLClassLoader > [DEBUG] Parent(Digester): java.net.URLClassLoader > [DEBUG] Parent(Digester): java.net.URLClassLoader > [DEBUG] Parent(Digester): java.net.URLClassLoader > [DEBUG] Parent(Digester): java.net.URLClassLoader > [DEBUG] CatalogBase: java.net.URLClassLoader > [DEBUG] Parent(CatalogBase): java.net.URLClassLoader > [DEBUG] Parent(CatalogBase): java.net.URLClassLoader > [DEBUG] Parent(CatalogBase): java.net.URLClassLoader > [DEBUG] Parent(CatalogBase): java.net.URLClassLoader > [DEBUG] Parent(CatalogBase): java.net.URLClassLoader > [DEBUG] Parent(CatalogBase): java.net.URLClassLoader > [ERROR] Begin event threw exception > java.lang.ClassNotFoundException: org.apache.commons.chain.impl.CatalogBase > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358) > (...) > > I cannot do it for ConfigCatalogRule, because it has default (not > public) visibility [1]. > > [1] > http://commons.apache.org/chain/xref/org/apache/commons/chain/config/ConfigCatalogRule.html > > Thanks, > > João > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]