Yes, this works for me. I have added to following statement before
creating my WS-Client and the error is gone:
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
This seams to be an issue with Apache CXF 2.4 since other users had
similar problems when using CXF in a context where the classloader was
something non-default. So it wasn't Kettles fault ;-)
Thank you for the information.
Regards
Martin
On May 12, 6:57 pm, Nick Baker <
codeoncof...@gmail.com> wrote:
> Kettle's Plugin Classloaders are different in that they're "inverted" or
> self-first. A plugin's classloader will first try to find a class within
> itself and look up to the parent classloader only when it's not found. This
> allows us to supply a different version of a particular library by placing
> it in the plugin's local lib folder.
>
> I'm suspect that this would cause an issue with CXF as it is very similar to
> how most application servers isolate webapps. Though if it is you may have
> luck setting the Thread's context classloader temporarily to your plugin
> classloader:
>
> Classloader originalClassloader =
> Thread.currentThread().getContextClassLoader();
> Thread.currentThread().setContextClassLoader(MyPluginClass.class.getClassLo ader());
> ...//Execute library code
> Thread.currentThread().setContextClassLoader(originalClassloader);
>
> -Nick B
>
>
>
>
>
>
>
> On Wed, May 11, 2011 at 6:16 PM, Gabriele <
ic...@yahoo.it> wrote:
> > Hi Martin,
>
> > did you try to catch the "Throwable" excpetion instead of the normal
> > "Exception"? The Throwable exception is able to catch even the
> > NoClassDefFound exception that I think may be your problem!
>
> > regards.
>
> > Gabriele.
>
> > ------------------------------
> > *Da:* Martin Thurau <
martin.thu...@gmail.com>
> > *A:* kettle-developers <
kettle-d...@googlegroups.com>
> > *Inviato:* Mercoledì 11 Maggio 2011 16:57
> > *Oggetto:* How does the classloader for plugins differentiate from the