This turns out to be an old favorite bug in Maven 2.2.1. When Maven invokes a plugin, it does not set the Thread context classloader to the plugin's classloader.
On Thu, Feb 28, 2013 at 8:16 AM, Sergey Beryozkin <[email protected]> wrote: > Hi Benson > is it 2.8.0-SNAPSHOT ? If so then add cxf-rt-rs-client dependency, as the > client runtime code has been moved to its own module, in preparation for > getting JAX-RS 2.0 client API done too > > It will all be in the migration guide > > Cheers, Sergey > > > On 28/02/13 05:22, Benson Margulies wrote: >> >> More useful stacktrace: >> >> Caused by: java.lang.ClassNotFoundException: >> com.sun.ws.rs.ext.RuntimeDelegateImpl >> at java.net.URLClassLoader$1.run(URLClassLoader.java:202) >> at java.security.AccessController.doPrivileged(Native Method) >> at java.net.URLClassLoader.findClass(URLClassLoader.java:190) >> at java.lang.ClassLoader.loadClass(ClassLoader.java:306) >> at >> org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195) >> at >> org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255) >> at >> org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274) >> at >> org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214) >> at java.lang.ClassLoader.loadClass(ClassLoader.java:247) >> at java.lang.Class.forName0(Native Method) >> at java.lang.Class.forName(Class.java:169) >> at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:62) >> >> Looks like the wrong classloader is in use. I wonder how I can fix this? >> >> On Wed, Feb 27, 2013 at 8:43 PM, Benson Margulies<[email protected]> >> wrote: >>> >>> java.lang.RuntimeException: java.lang.RuntimeException: >>> java.lang.ClassNotFoundException: >>> com.sun.ws.rs.ext.RuntimeDelegateImpl >>> at >>> org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.createWebClient(JAXRSClientFactoryBean.java:217) >>> >>> >>> This is happening inside of a maven plugin, only with maven 2.2.1. Is >>> there some dependency I need to add? > > > > -- > Sergey Beryozkin > > Talend Community Coders > http://coders.talend.com/ > > Blog: http://sberyozkin.blogspot.com
