apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.69k stars 853 forks source link

No libraray found for namespace jakarta.faces.html #5470

Closed richard-grin closed 1 year ago

richard-grin commented 1 year ago

Apache NetBeans version

Apache NetBeans 17 release candidate

What happened

The new namespaces of JSF 6.0 (in Jakarta EE 10) are not known by NetBeans in the JSF pages.

How to reproduce

Create a new Maven project for a Web application and add a new JSF page that uses one of the namespaces. For example:

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      **xmlns:h="jakarta.faces.html"
      xmlns:f="jakarta.faces.core"**>

However, it is possible to do a Clean and build of the project and the project can be launched and it works.

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows 11 Family 64-bit, version 21H2

JDK

17

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

No response

Are you willing to submit a pull request?

No

Code of Conduct

Yes

richard-grin commented 1 year ago

Precision: NetBeans release candidate 1

richard-grin commented 1 year ago

Weird: the error message appears only if the 2 lines for the namespaces are followed by this line (or perhaps another namespace): xmlns:p="http://primefaces.org/ui"

NicolaIsotta commented 1 year ago

Probably related to #4976

mbien commented 1 year ago

I assume this is no regression, it already didn't work in NB 16, right?

richard-grin commented 1 year ago

Sure. NB 16 did not support Jakarta EE 10.

morvael commented 1 year ago

The issue remains in released NB 17 (not RC).

tmsanchez commented 1 year ago

I'll be working on this issue and will putting my findings here

NicolaIsotta commented 1 year ago

I'll be working on this issue and will putting my findings here

Have look at my comment https://github.com/apache/netbeans/issues/4976#issuecomment-1324948303 , I think ConfigManager class may be the cause

tmsanchez commented 1 year ago

got it I'll take a look.

I was also debugging and red hints dissapear if following lines are added to NS_MAPPING constant in NameSpacesUtils class

    NS_MAPPING.put("jakarta.faces.html", "http://java.sun.com/jsf/html");                                          //NOI18N
    NS_MAPPING.put("jakarta.faces.core", "http://java.sun.com/jsf/core");       //NOI18N
    NS_MAPPING.put("jakarta.faces.facelets", "http://java.sun.com/jsf/core");       //NOI18N

https://github.com/apache/netbeans/blob/master/enterprise/web.jsfapi/src/org/netbeans/modules/web/jsfapi/api/NamespaceUtils.java

above class i n JSP API nbmodule

imagen

tmsanchez commented 1 year ago

I'm still working on it, I hope to have a good progress this weekend.

On Tue, Apr 4, 2023 at 6:30 PM kesha-han @.***> wrote:

Hi, I wonder when the bug could be fixed. Before it is fixed, could you send me the module jar of web.jsfapi or .class of NamespaceUtil.java to let it just work without error tips? @tmsanchez https://github.com/tmsanchez I got errors when building NB 17 source codes.

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

morvael commented 1 year ago

How is it going?

morvael commented 1 year ago

I'll be working on this issue and will putting my findings here

Have look at my comment #4976 (comment) , I think ConfigManager class may be the cause

It seems there is no support for new schemas in the referenced DbfFactory class :(

morvael commented 1 year ago

The rest should be pretty straightforward (provided one finds every reference to old namespaces and versions in NB codebase), because the code already went through adding support for new namespaces (when going from sun to jcp). So this will be more of the same. But how to change external libraries of NB project - I have no idea. Newest version of DbfFactory from Mojarra looks like a completely different class.

AndrewG10i commented 1 year ago

NB18 - the issue still present, will be really nice to have it fixed in nearest releases! 0:-) Thank you in advance!

asbachb commented 1 year ago

Should be fixed with https://github.com/apache/netbeans/pull/6096

Inviting you to pull the PR and validate.