Where are these classes loaded from ? The class that actually load these classes must be in the same classloader. Do you have clean lib and lib/optional folders ?
On Jan 22, 2008 6:02 PM, Gordon Dickens <[EMAIL PROTECTED]> wrote: > I did try defining with the explicit classpath (as below). I also tried > setting the "self-first" and "parent-first" settings within separate > tests and still the same result. > > I want the classes to be loaded from jars within the SU, but it seems as > though they are only loading when they are in the > ServiceMix/lib/optional directory. > > Any other suggestions? > > Thanks, > Gordon Dickens > > Guillaume Nodet wrote: > > Have you tried without defining the <classpath/> element explicitely ? > > The component will create the correct classloader by defaut. > > Anyway, if this does not work, the problem may be completely different. > > It depends on where the classes are loaded from: are they loaded from > the > > SU or from the component or even container for some reason ? > > > > > > On Jan 18, 2008 9:58 PM, Gordon Dickens <[EMAIL PROTECTED]> > wrote: > > > > > >> Hello, > >> > >> In an effort to minimize the clutter of our ServiceMix (v3.2.1) > >> lib/optional directory I would like to bundle dependent jars within > >> their corresponding service units. > >> > >> The problem I am running into is with a service unit that requires > >> several cryptix jars for decryption. > >> > >> The jar definitions are defined within the SUs pom.xml as > >> <dependency> > >> <groupId>cryptix</groupId> > >> <artifactId>cryptix-jce-api</artifactId> > >> <version>1.0</version> > >> </dependency> > >> <dependency> > >> <groupId>cryptix</groupId> > >> <artifactId>certpath-api-compat</artifactId> > >> <version>1.0</version> > >> </dependency> > >> <dependency> > >> <groupId>cryptix</groupId> > >> <artifactId>cryptix-jce-provider</artifactId> > >> <version>1.0</version> > >> </dependency> > >> <dependency> > >> <groupId>cryptix</groupId> > >> <artifactId>cryptix-message-api</artifactId> > >> <version>1.0</version> > >> </dependency> > >> <dependency> > >> <groupId>cryptix</groupId> > >> <artifactId>cryptix-openpgp-provider</artifactId> > >> <version>1.0</version> > >> </dependency> > >> <dependency> > >> <groupId>cryptix</groupId> > >> <artifactId>cryptix-pki-api</artifactId> > >> <version>1.0</version> > >> </dependency> > >> > >> > >> The SUs xbean.xml contains > >> > >> <classpath> > >> <location>lib/certpath-api-compat-1.0.jar</location> > >> <location>lib/cryptix-jce-api-1.0.jar</location> > >> <location>lib/cryptix-jce-provider-1.0.jar</location> > >> <location>lib/cryptix-message-api-1.0.jar</location> > >> <location>lib/cryptix-openpgp-provider-1.0.jar</location> > >> <location>lib/cryptix-pki-api-1.0.jar</location> > >> <location>.</location> > >> </classpath> > >> > >> These jars are being included in the deployment jar and in the > >> servicemix/data directory I see the service unit expanded with the jars > >> in the SUs exploded lib directory. > >> > >> The page http://servicemix.apache.org/classloaders.html leads me to > >> believe that I am doing this correctly. > >> > >> When this service runs I get java.lang.NoClassDefFoundError: > >> cryptix/message/MessageException. > >> > >> Can anyone shed light on this issue? > >> > >> Thanks in advance, > >> Gordon Dickens > >> > >> > > > > > > > > -- > > Cheers, > > Guillaume Nodet > > ------------------------ > > Blog: http://gnodet.blogspot.com/ > > . > > > > > > -- Cheers, Guillaume Nodet ------------------------ Blog: http://gnodet.blogspot.com/
