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 201208220001) VM: Java HotSpot(TM) 64-Bit Server VM, 23.1-b03, Java(TM) SE Runtime Environment, 1.7.0_05-b05 OS: Linux User Comments: GUEST: installed nightly (imported settings from existing 7.2 installation) just started netbeans with some maven projects wich were in the old workspace Stacktrace: java.lang.NullPointerException at org.netbeans.modules.web.jsf.editor.JsfSupportImpl.<init>(JsfSupportImpl.java:155) at org.netbeans.modules.web.jsf.editor.JsfSupportImpl.findForProject(JsfSupportImpl.java:106) at org.netbeans.modules.web.jsf.editor.JsfSupportProviderImpl.getSupport(JsfSupportProviderImpl.java:59) at org.netbeans.modules.web.jsfapi.spi.JsfSupportProvider.get(JsfSupportProvider.java:105) at org.netbeans.modules.web.jsfapi.spi.JsfSupportProvider.get(JsfSupportProvider.java:85) at org.netbeans.modules.web.jsf.editor.JsfPageMetadataProvider.getMetadataMap(JsfPageMetadataProvider.java:78)
Created attachment 123392 [details] stacktrace
Reproduceable in 7.2 patch 1 candidate.
Created attachment 125058 [details] stacktrace starting netbeans
Created attachment 125282 [details] stacktrace starting netbeans
This is marked as a patch candidate. Marek/Martin, is this really just P3? How important is it to fix for 7.2.1 (aka patch2)?
Created attachment 125345 [details] stacktrace
(In reply to comment #5) > This is marked as a patch candidate. Marek/Martin, is this really just P3? How > important is it to fix for 7.2.1 (aka patch2)? At least P2 make sense to me since there are more then 40 reports. Happens in cases of no (null) compile classpath of the webproject, I browse sources a little bit and was able to reproduce it: 1, create new web application 2, remove web directory 3, create XHTML page in SRC directory 4, restart IDE and invoke CC inside #{} of the facelet -> this NPE appears
> At least P2 make sense to me since there are more then 40 reports. Happens in > cases of no (null) compile classpath of the webproject, I browse sources a > little bit and was able to reproduce it: > 1, create new web application > 2, remove web directory > 3, create XHTML page in SRC directory > 4, restart IDE and invoke CC inside #{} of the facelet > -> this NPE appears What does this mean? Creating an invalid project will cause a NPE? Just this one? I would ask what is the project which have java sources but have no compile classpath. Is this normal?
(In reply to comment #8) > What does this mean? Creating an invalid project will cause a NPE? Just this > one? Marku, I really don't know! I attached steps I figured out if you would be interested in reproducing that but I can't tell you that there is no other way how the get it. > I would ask what is the project which have java sources but have no compile > classpath. Is this normal? No, it doesn't look to me normal at all as well, but the count of reported cases speak about something different. So there must exist another way for reproducing or described steps can be in some cases valid? Probably David could know more?
Martine, you are right the other branch cannot cause the NPE - it must be a the first one - a project with WebModule which have somehow broken the classpath. I can simply fix that by returning no JsfSupport for such project, but question is if all the duplicates are for broken web project or there is (more likely) a bug in the web project classpath provider.
Created attachment 125423 [details] stacktrace opening a nomral complexit mvn project with submodules (around 15 hierarchical)
This bug already has 50 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=191388
By the way, JSF is not used in any module of my project.
Would be anybody able to send us link to repo or project where is able to reproduce this issue? You could send it also "offline" to <login>[at]netbeans.org. We could try out discover where is the base cause of this issue.
Unfortunately, I am not allowed to provide the link to the same project, which I am wokring on. When I encounter this problem working on my own project, I'll publish the link to its repository.
Today I tried to open that project under 32-bit Windows 7, and NullPointerException did not appear.
(In reply to comment #2) > Reproduceable in 7.2 patch 1 candidate. Tomas, do you know how to reproduce this problem?
I had a look at the code but have no idea when this problem could happen. It does not make much sense. I would fix it the way you suggested Marek, maybe log a warning/info into the log and we will see. If we just preventing some other problem then sooner or later users will tell us about it, eg. "there is no NPE anymore but code completion does show ...." type of feedback.
(In reply to comment #18) > I had a look at the code but have no idea when this problem could happen. It > does not make much sense. I would fix it the way you suggested Marek, maybe log > a warning/info into the log and we will see. If we just preventing some other > problem then sooner or later users will tell us about it, eg. "there is no NPE > anymore but code completion does show ...." type of feedback. Ok Davide, could you please do that before 24:00 Oct/9 in a releases branch ? Thanks in advance.
(In reply to comment #19) > Ok Davide, could you please do that before 24:00 Oct/9 in a releases branch ? > Thanks in advance. Marek, are you going to fix this today or should I do it?
I tried to hotfix it. Please review. Because of typing I'm putting it straight into release72 branch. web-main#07cdf5ff129c changeset: 243065:16c5c1d8fe40 branch: release72 user: David Konecny <dkonecny@netbeans.org> date: Tue Oct 09 14:45:59 2012 -0700 summary: changeset: 235198:07cdf5ff129c
"timing" ... not "typing"
thanks Davide, the hotfix is ok.
Integrated into 'releases', will be available in build *201210100934* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/16c5c1d8fe40 User: David Konecny <dkonecny@netbeans.org> Log: changeset: 235198:07cdf5ff129c user: David Konecny <dkonecny@netbeans.org> date: Tue Oct 09 14:41:46 2012 -0700 files: web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/JsfSupportImpl.java description: #217213 - NullPointerException at org.netbeans.modules.web.jsf.editor.JsfSupportImpl.<init>
Integrated into 'main-golden', will be available in build *201210110002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/07cdf5ff129c User: David Konecny <dkonecny@netbeans.org> Log: #217213 - NullPointerException at org.netbeans.modules.web.jsf.editor.JsfSupportImpl.<init>
I can't reproduce it following steps from comment #4, once I removed web directory, warning dialog about its missing is popping up and I can't finish New File dialog. I tried to create the xhtml JSF page externally and just open it in IDE and code completion did not throw this exception So carefully verifying in patch... Product Version: NetBeans IDE 7.2.1 (Build 201210100934) Java: 1.7.0_07; Java HotSpot(TM) Client VM 23.3-b01 System: Linux version 3.2.0-31-generic-pae running on i386; UTF-8; en_US (nb)
*** Bug 218538 has been marked as a duplicate of this bug. ***