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.
WebLogic 12.1.3 supports JAX-RS 2.0 via a deployable library, located in wlserver/common/deployable-libraries/jax-rs-2.0.war. NetBeans should support developing with JAX-RS 2.0 in Java EE 6 projects with WebLogic 12.1.3 target. Not sure what the workflow would be - would the user choose the JAX-RS version? And when? I recall we did something similar for JSF, what was the workflow in that case? Thanks.
Everything seems to be ready (server library, API to use them) just WS wizards don't have a place where one would select RS version (as opposed to JSF) afaik.
I found, to use a specific WLS deployable library (e.g. jax-rs 2.0), from the (web) project, you have to: 1. install/deploy the library on the server 2. configure the usage of that library in project's weblogic.xml, e.g.: --------------------------------------- <weblogic-web-app ...> ... <library-ref> <library-name>jax-rs</library-name> <specification-version>2.0</specification-version> <implementation-version>2.5.1</implementation-version> </library-ref> ... </weblogic-web-app> ---------------------------------------- If this is done, on the project site, the jar files from the library are added to project classpath. The REST wizard then recognizes JAX-RS 2.0 and generates REST resources properly. However, there is one issue in REST Services wizard - the "Use Jersey Specific Feature" checkbox, providing Jersey 1 style configuration is available in the wizard panel. Checking this option would generate incorrect stuff in web.xml. Problem is also, in our case, that original Jersey_1 libraries are overlapped by Jersey 2.0 libraries, but there are still Jersey_1 libraries wisible in project's view (this is probably unrealistic to fix) Will try to fix the wizard issue. I don't think it is good to provide the steps 1/ and 2/ from Netbeans Wizard. The advanced users are hopefully able to do that - from the server console and by manual editing of WEB-INF/weblogic.xml.
Fixed the issue with "Use Jersey Specific Feature" checkbox panel - the panel doesn't appear when JAX-RS 2.0 is present on classpath: http://hg.netbeans.org/web-main/rev/14c3b4ee15b6 Talked to P.Hejl. It would be useful when Netbeans is able to recognize that JAX-RS 2.0 deployable library is installed and in that case, JAX-RS 2.0 will be registerred in project's weblogic.xml - if not registerred yet, and if user accepts this option. So the issue is still open.
Integrated into 'main-silver', will be available in build *201408010001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/14c3b4ee15b6 User: Milan Kuchtiak <mkuchtiak@netbeans.org> Log: #246103: don't display 'Use Jersey Specific Feature' checkbox when JAX-RS 2.0 is on classpath
Implemented a confirmation dialog (see the attachment) where user is asked whether to configure the (web) project to use JAX-RS 2.0 library. This way, the modification of weblogic.xml is done automatically by Netbeans, using specific j2eeserver API (step 2). Nevertheless, the step 1 - JAX-RS 2.0 library installation requires to be done manually by user (e.g. in WebLogic consolle). See the changeset: http://hg.netbeans.org/web-main/rev/4e7393e683e8 After an agreement, increasing priority to P2, as Netbeans should facilitate the project configuration, to use JAX-RS 2.0, as much as possible on WL server.
Created attachment 148465 [details] Dialog asking user to allow the project configuration to use JAX-RS 2.0
Sounds good, thanks. BTW, here is a relevant blog: http://buttso.blogspot.cz/2014/07/developing-with-jax-rs-20-for-weblogic.html One question, does everything also work with Maven web projects as expected?
Integrated into 'main-silver', will be available in build *201408020001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/4e7393e683e8 User: Milan Kuchtiak <mkuchtiak@netbeans.org> Log: #246103: Give user an option to configure the project to use JAX-RS 2.0 library if it is installed on the server (especally useful for WebLogic, where the JAX-RS 2.0 library is optionally installable
> One question, does everything also work with Maven web projects as expected? Maven (web) projects don't use server libraries at compilation time, there is no such a contract between project and server. It's up to user to configure project properly to use JAX-RS 2.0 (Step 2).
Vlada, could you plese verify the fix in trunk ? Petr, could you please review the fix in java code ?
Verified, the dialog appears, weblogic.xml is being updated Product Version: NetBeans IDE Dev (Build 201408050001) Java: 1.8.0_11; Java HotSpot(TM) Client VM 25.11-b03 Runtime: Java(TM) SE Runtime Environment 1.8.0_11-b12 System: Linux version 3.13.0-32-generic running on i386; UTF-8; en_US (nb)
The fix looks good.
Thanks for the review. Changesets transplanted to 8.0.1: http://hg.netbeans.org/releases/rev/bcd60a55c437 http://hg.netbeans.org/releases/rev/e78da5855cf0
Integrated into 'releases/release801', will be available in build *201408071314* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/bcd60a55c437 User: Milan Kuchtiak <mkuchtiak@netbeans.org> Log: #246103: don't display 'Use Jersey Specific Feature' checkbox when JAX-RS 2.0 is on classpath
Verified in 8.0.1 Product Version: NetBeans IDE 8.0.1 RC1 (Build 201408072300) Java: 1.8.0_11; Java HotSpot(TM) Client VM 25.11-b03 Runtime: Java(TM) SE Runtime Environment 1.8.0_11-b12 System: Linux version 3.13.0-32-generic running on i386; UTF-8; en_US (nb)