netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

JakartaEE Auto complete of @Named Managed Beans not working in Netbeans 14

Open bercolax opened this issue 3 years ago • 2 comments

Apache NetBeans version

Apache NetBeans 14

What happened

I have created a Maven built JakartaEE 9 web application in Netbeans 14. Other things are working fine. But in the JSF page, I am not able to see the EL auto complete displaying the list of @Named beans. As the packages have been renamed jakarta (replacing javax), may be the changes must be done in the related modules to list the @jakarta.inject.Named annotated Java classes in the EL autocomplete. The navigation from the EL in the JSF page to the Java source code of the jakarta.inject.Named annotated Java classes is also not happening.

How to reproduce

  • Create a brand new JakartaEE 9 based Maven web app
  • Create a simple @jakarta.inject.Named annotated backing bean with @Named(value="demoBean") with just 1 function
  • In the JSF create EL #{ and then in the auto complete you dont see demoBean being listed.

Did this work correctly in an earlier version?

No

Operating System

Ubuntu 20+, Windows 11

JDK

JDK 11

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

Every time

Are you willing to submit a pull request?

No

Code of Conduct

Yes

bercolax avatar Jul 06 '22 05:07 bercolax

same problem. NB 13 and 14 if you hard code el link in it works fine, but will not display. Using Payara Community server, followed their Jakarta EE 9 tutorial where the same el worked perfectly on IntelliJ platform. If you just import Javax.inject.Name it displays correctly in NB.

grantleyT avatar Aug 03 '22 21:08 grantleyT

I guess in the NB plugin must do a Search javax and replace with jakarta and publish this as an add on plugin for those who want to work with Jakarta EE 9 onwards.

bercolax avatar Aug 11 '22 12:08 bercolax

I can still reproduce this issue with NetBeans 15 and 16-rc1.

javierllorente avatar Oct 21 '22 19:10 javierllorente

Same here, I tried it last night with the Jakarta 9.1 compatible Glassfish Server. Still no luck!

On Sat, 22 Oct 2022, 6:13 am Javier Llorente, @.***> wrote:

I can still reproduce this issue with NetBeans 15 and 16-rc1.

— Reply to this email directly, view it on GitHub https://github.com/apache/netbeans/issues/4338#issuecomment-1287344014, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANAJPVJWKM2KGA64UYYMAQ3WELTNFANCNFSM52YNK3CQ . You are receiving this because you commented.Message ID: @.***>

grantleyT avatar Oct 22 '22 03:10 grantleyT

Incase we can get involved and help, kindly let me know. Will be happy to get involved. We can have two jars for related plugin. Users working with the jakartaee packages can uninstall the javax.xxx plugin and install the jakartaee.xxx plugin.

  • If any user wishes to work on older versions they can have two versions of Netbeans like Netbeans 15 for jakartaee and Netbeans 14 for javax.xx based.
  • I guess the highlighted plugin is responsible for providing the autocomplete image

bercolax avatar Oct 22 '22 05:10 bercolax

Can any one please tell if this has been fixed in Netbeans 16? (released on Nov 30, 2022)

bercolax avatar Dec 10 '22 12:12 bercolax

Cdi beans annotated with jakarta.inject.Named stil not detected in NetBeans 16

In a maven web application with jakartaee 9.1 and facelets when try auto complete in #{} expression are till proposed beans with javax namespace instead of jakarta namespace e.g. javax.servlet.http.httpsession

Screenshot from 2022-12-11 18-01-43

menny68 avatar Dec 11 '22 17:12 menny68

I had done some work on this issue earlier this year but the PR was not submitted in time for release. I need to perform a diff against the latest code and my working branch to try and determine what is still causing this issue. Will try to get this done soon. Sorry for the delay.

juneau001 avatar Dec 12 '22 01:12 juneau001

Ok, thanks for the update.

On Mon, 12 Dec 2022, 12:22 pm Josh Juneau, @.***> wrote:

I had done some work on this issue earlier this year but the PR was not submitted in time for release. I need to perform a diff against the latest code and my working branch to try and determine what is still causing this issue. Will try to get this done soon. Sorry for the delay.

— Reply to this email directly, view it on GitHub https://github.com/apache/netbeans/issues/4338#issuecomment-1345737041, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANAJPVJLSZXVMNPCS7ERP3LWMZ44LANCNFSM52YNK3CQ . You are receiving this because you commented.Message ID: @.***>

grantleyT avatar Dec 12 '22 01:12 grantleyT

I had done some work on this issue earlier this year but the PR was not submitted in time for release. I need to perform a diff against the latest code and my working branch to try and determine what is still causing this issue. Will try to get this done soon. Sorry for the delay.

Thanks for the reply and the update.

bercolax avatar Dec 13 '22 18:12 bercolax

hello, I have the same problem (cannot detect CDI beans in xhtml files ). i'm using Netbeans 14 and jakartaEE 10 with the compatible eclipse glassfish server.

king-martinien avatar Feb 26 '23 23:02 king-martinien

hello, I have the same problem (cannot detect CDI beans in xhtml files ). i'm using Netbeans 14 and jakartaEE 10 with the compatible eclipse glassfish server.

Now i have downloaded Netbeans 17 and the problem is still there.

king-martinien avatar Mar 02 '23 04:03 king-martinien

Hi, the only way I have been able to use autocompletions in jsp is by adding the javax.servlet-api library with java 11. Does anyone know another way? Since for everything to be correct when we compile jsp, we must remove that library so that it uses jakarta instead of javax. Thank you

OnElectric avatar Mar 15 '23 23:03 OnElectric

in netbeans 17 and jdk 20, autocomplete does not work between <%%> in jsp file, please help

AmilMammadli avatar Mar 26 '23 20:03 AmilMammadli

Unfortunately it was not possible to solve this problem I am using 17 without success the problem is that this is an essential tool for development making programming much easier did anyone succeed?

llufti avatar Apr 13 '23 14:04 llufti

This is the same as issue #4035. I currently have a PR to repair that issue in progress.

juneau001 avatar Apr 24 '23 15:04 juneau001

Still have this issue. MacOsx , Windows, Linux Netpeans 14, 16, 17.

apapamarkou avatar May 25 '23 16:05 apapamarkou

@bercolax @apapamarkou @grantleyT @menny68

Should be fixed in NetBeans 18. Would be nice if someone could double check so that we can close the issue.

asbachb avatar Jun 19 '23 15:06 asbachb

Issue is still present for me in 18, no named beans discovered, no EL auto-completion in projects that use JakartaEE.

astain avatar Jun 28 '23 13:06 astain

Fixed with #6160

asbachb avatar Jul 17 '23 17:07 asbachb

Installed Netbeans 19 and verified that the issue has been fixed. Thanks a lot.

bercolax avatar Sep 13 '23 06:09 bercolax