This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Trying to use the NetBeans Platform in RESTClient mode as described here https://netbeans.org/kb/72/websvc/jersey-rcp-client.html I discovered that from 8.0.1 onwards the configuration of websvc.restlib for the Jersey Implementation is bad. Somewhere in the downgrading process of Jersey (#245294) it seems the classpath was broken. The missing piece I can confirm is cglib, which was on the classpath before but is now missing. The resulting exception is: java.lang.ClassNotFoundException: net.sf.cglib.proxy.MethodInterceptor at java.net.URLClassLoader$1.run(URLClassLoader.java:372) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:360) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:222) Caused: java.lang.ClassNotFoundException: net.sf.cglib.proxy.MethodInterceptor starting from ModuleCL@7d85e38d[org.netbeans.modules.websvc.restlib] with possible defining loaders null and declared parents [ModuleCL@79a9af8b[org.netbeans.modules.xml.jaxb.api], ModuleCL@610ddd47[org.netbeans.modules.j2ee.eclipselink]] at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:224) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) Caused: java.lang.NoClassDefFoundError: net/sf/cglib/proxy/MethodInterceptor at org.jvnet.hk2.external.generator.ServiceLocatorGeneratorImpl.initialize(ServiceLocatorGeneratorImpl.java:71) at org.jvnet.hk2.external.generator.ServiceLocatorGeneratorImpl.create(ServiceLocatorGeneratorImpl.java:96) at org.glassfish.hk2.internal.ServiceLocatorFactoryImpl.internalCreate(ServiceLocatorFactoryImpl.java:251) at org.glassfish.hk2.internal.ServiceLocatorFactoryImpl.create(ServiceLocatorFactoryImpl.java:228) at org.glassfish.jersey.internal.inject.Injections._createLocator(Injections.java:142) at org.glassfish.jersey.internal.inject.Injections.createLocator(Injections.java:113) at org.glassfish.jersey.internal.RuntimeDelegateImpl.<init>(RuntimeDelegateImpl.java:60) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:408) at java.lang.Class.newInstance(Class.java:433) at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:117) at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:207) at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:135) at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:120) at javax.ws.rs.core.UriBuilder.newInstance(UriBuilder.java:95) at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:119) at org.glassfish.jersey.client.JerseyWebTarget.<init>(JerseyWebTarget.java:72) at org.glassfish.jersey.client.JerseyClient.target(JerseyClient.java:177) at org.glassfish.jersey.client.JerseyClient.target(JerseyClient.java:68) There is no workaround besides creating your own module.
Is this coming from the platform application runtime? Can you provide the app for testing? The cglib seems to be included.
You are right, it is included but it is not on the classpath. The new version (2.10) did not use cglib, so it was removed from the distribution and removed from classpath. Reverting back to 2.5 cglib was added back to the distribution, but not to the classpath.
Ok, I see. Should be fixed in web-main 46fe48d044f6.
Integrated into 'main-silver', will be available in build *201504020001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/46fe48d044f6 User: Petr Hejl <phejl@netbeans.org> Log: #248977 - NetBeans Platform as REST Client is broken