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.
Build: NetBeans IDE Dev (Build 20130515-8ffb71db1a32) VM: Java HotSpot(TM) 64-Bit Server VM, 23.21-b01, Java(TM) SE Runtime Environment, 1.7.0_21-b11 OS: Linux User Comments: dkonecny: Generating REST Java Client for Delicious -> Bookmarking Service -> posts/all throws this exception because OAuth does not seem to be supported in Jersey 2.0. Or perhaps this was not implemented on NB side yet. Stacktrace: java.lang.AssertionError at org.netbeans.modules.websvc.rest.client.JaxRsGenerationStrategy.generateOAuthMethods(JaxRsGenerationStrategy.java:803) at org.netbeans.modules.websvc.rest.client.ClientJavaSourceHelper.generateClassArtifacts(ClientJavaSourceHelper.java:527) at org.netbeans.modules.websvc.rest.client.ClientJavaSourceHelper.modifyJerseyClientClass(ClientJavaSourceHelper.java:391) at org.netbeans.modules.websvc.rest.client.ClientJavaSourceHelper.access$000(ClientJavaSourceHelper.java:126) at org.netbeans.modules.websvc.rest.client.ClientJavaSourceHelper$1.run(ClientJavaSourceHelper.java:340) at org.netbeans.modules.websvc.rest.client.ClientJavaSourceHelper$1.run(ClientJavaSourceHelper.java:331)
Created attachment 134491 [details] stacktrace
Waiving this bug for 7.3.1.
The Delicious as well as Twitter client were examples demonstrating how to use OAuth authentication with Jersey (1.x). The OAuth libraries (oauth-client and oauth-signature) were removed from Jersey 2.0 library and the generated code was simplified (AssertionError was included). Solutions: 1, The Simplest comment out AssertionError from the code 2. The Most Complex. Add oauth-client and oauth-signature back to JerseyLibrary and figure out how to rewrite old (Jersey 1.x) code to new JAX-RS 2.0/Jersey 2.0 code 3. Provide some hint to user that the Delicious client requires OAuth functionality, that requires Jersey 1.x + oauth-client + oauth-signature jar files, and this can be implemented in Java EE 6 project types only.
The solution 2 is not realistic. The oauth-client/ oauth-signature libraries were not migrated to Jersey 2.0 yet.
Delicious rest resources were likely simplified recently. OAuth authentication is not needed any more, but the BASIC authentication is required. Also "http://api.del.icio.us/v2" URL is not working anymore, but "http://api.del.icio.us/v1" works. I discovered one important issue anyway. The Rest Client Wizard with Basic Authentication is incorrectly generated(see bug 231819).
Fixed for 7.4: Changed authentication to Basic.
Integrated into 'main-silver', will be available in build *201306272300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/43a65ada94aa User: Milan Kuchtiak <mkuchtiak@netbeans.org> Log: #229816 change Delicious authentication to Basic