I tried it but I get the following error: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JLogger does not implement Log at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:532) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:272) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:246) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395) at org.apache.servicemix.common.BaseComponent.<init>(BaseComponent.java:41) at it.imolinfo.jbi4corba.jbi.Jbi4CorbaComponent.<init>(Jbi4CorbaComponent.java:8) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at java.lang.Class.newInstance0(Class.java:350) at java.lang.Class.newInstance(Class.java:303) at org.apache.servicemix.jbi.framework.InstallerMBeanImpl.activateComponent(InstallerMBeanImpl.java:153) at org.apache.servicemix.jbi.framework.InstallerMBeanImpl.install(InstallerMBeanImpl.java:136) at org.apache.servicemix.jbi.framework.InstallationService.install(InstallationService.java:369) at org.apache.servicemix.jbi.framework.InstallationService.install(InstallationService.java:342) at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:220) at org.apache.servicemix.jbi.framework.AutoDeploymentService $2.run(AutoDeploymentService.java:507) at org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor $Worker.run(Unknown Source) at java.lang.Thread.run(Thread.java:595) Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JLogger does not implement Log at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:416) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:525) ... 20 more Caused by: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JLogger does not implement Log at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:412) ... 21 more
my interpretation is that the Log interface of the Log4JLogger loaded by self-first class loader is not considered the same of that loaded by the parent class loader. In fact if I'm not if the same class is loaded by different classloader it is not considered the same in a jvm. This let me conclude that changing the class loader mode may have impact on the way a component is packaged. Anyway back to tools.jar, this jar is not present in servicemix distribution so the choice of the class loading mode shouldn't change the behaviuor because the jvm should use always the only jar present in the component packaging. What I don't understand is why if I package tools.jar inside the component it is not seen by the classloader, what has this jar different from others? PS: to make this trial I modified the maven-jbi-plugin to create a component deployment descriptor taking into account the component.class.loader.delegation parameter. in jbi.jsl I modified the 10th row <component type="${jbi.component.type}" component-class-loader-delegation="${jbi.component.class.loader.delegation}"> of course it will read the jbi.component.class.loader.delegation in the project.properties file. may be this could be reused. bye raffaele On Tue, 2006-03-21 at 19:07 +0100, Guillaume Nodet wrote: > You may want to change the way JBI classloaders are created by setting > the class-loader-delegation to self-first in the jbi descriptor of the > component so that the classloader will first look at the jars for the > component before looking at the parent classloader. > > Cheers, > Guillaume Nodet > > On 3/21/06, Raffaele Spazzoli <[EMAIL PROTECTED]> wrote: > > hi, > > I'm developing a bindig component that needs to generate classes during > > service unit deploy. It also need to use the tools.jar. > > If I include tools.jar in the component classpath I get a class not > > found exception, if I put tools.jar in servicemix optional folder it > > works. > > Do you know of any issuses why it souldn't work in the component > > classpath? > > > > bye Raffaele > > > > >