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.

Bug 240116 - NullPointerException at org.netbeans.modules.web.jsfapi.api.NamespaceUtils.getForNs
Summary: NullPointerException at org.netbeans.modules.web.jsfapi.api.NamespaceUtils.ge...
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Martin Fousek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-08 13:03 UTC by Maksim Khramov
Modified: 2014-01-10 02:42 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 202072


Attachments
stacktrace (2.16 KB, text/plain)
2014-01-08 13:03 UTC, Maksim Khramov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maksim Khramov 2014-01-08 13:03:56 UTC
Build: NetBeans IDE Dev (Build 201401020002)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.21-b01, Java(TM) SE Runtime Environment, 1.7.0_21-b11
OS: Windows 7

User Comments:
mkhramov: invoke code complete during edit JSF XHTML code

fleka: worked with faceletes, not sure when it happened




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.web.jsfapi.api.NamespaceUtils.getForNs(NamespaceUtils.java:86)
   at org.netbeans.modules.web.jsf.editor.JsfHtmlExtension.completeAttributes(JsfHtmlExtension.java:323)
   at org.netbeans.modules.html.editor.completion.HtmlCompletionQuery.query(HtmlCompletionQuery.java:485)
   at org.netbeans.modules.html.editor.completion.HtmlCompletionQuery$1.run(HtmlCompletionQuery.java:134)
   at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1391)
   at org.netbeans.modules.html.editor.completion.HtmlCompletionQuery.run(HtmlCompletionQuery.java:127)
Comment 1 Maksim Khramov 2014-01-08 13:03:57 UTC
Created attachment 143706 [details]
stacktrace
Comment 2 Maksim Khramov 2014-01-08 13:08:41 UTC
Steps to reproduce:

Have code
<?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="http://xmlns.jcp.org/jsf/html" xmlns:jsf="http://java.sun.com/jsf">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <select size="1" jsf:value="#{test.name}" >
            <f:selectItem  
        </select>
    </h:body>
</html>

Press space after <f:selectItem

Once I declared required namespace xmlns:f="http://java.sun.com/jsf/core" exception disappears
Comment 3 Martin Fousek 2014-01-09 10:12:33 UTC
Reported thanks for the additional information which helped me to reproduce the issue. It's fixed in web-main #93554cffbc85. Now it will offer attributes of the element if used prefix equals default prefix of the library.
Comment 4 Quality Engineering 2014-01-10 02:42:25 UTC
Integrated into 'main-silver', will be available in build *201401100002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/93554cffbc85
User: Martin Fousek <marfous@netbeans.org>
Log: #240116 - NullPointerException at org.netbeans.modules.web.jsfapi.api.NamespaceUtils.getForNs