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 107275 - NPE on creating 1.4 project with 'Do not Append Library' option selected On Tomcat 6
Summary: NPE on creating 1.4 project with 'Do not Append Library' option selected On T...
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: _ deva
URL:
Keywords:
: 107138 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-19 17:10 UTC by Yousuf Haider
Modified: 2007-08-02 18:35 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NPE (1.37 KB, text/plain)
2007-06-19 17:13 UTC, Yousuf Haider
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Haider 2007-06-19 17:10:24 UTC
JDK 6.
Build:200706190000

Steps to reproduce:

-Create new 1.4 VW JSF project with Tomcat 6 as target server and 'Do Not Append any Library' option selected.


NPE will be thrown:


java.lang.NullPointerException
	at org.netbeans.modules.visualweb.insync.models.FacesModel.addXRefAccessors(FacesModel.java:1815)
	at org.netbeans.modules.visualweb.insync.models.FacesModelSet.<init>(FacesModelSet.java:377)

(Full exception attached)

To Clarify:

Since there is no JSF1.1 RI available to the project, the project should Show component errors or source file errors. 

*It should not throw an NPE.* 




From the exception it seems to be an insync issue.
Comment 1 Yousuf Haider 2007-06-19 17:13:32 UTC
Created attachment 43983 [details]
NPE
Comment 2 _ potingwu 2007-06-19 17:52:07 UTC
*** Issue 107138 has been marked as a duplicate of this issue. ***
Comment 3 _ sandipchitale 2007-07-11 15:30:59 UTC
Deva, this is happening because in the given scenario the project does not have the required libraries. Therefore 
there is a import error in the newly created .java file of the first page itself. As a result addXRefAccessors() thows 
an NPE. I know we removed the ensureXrefAccessor() stuff and replaced it with addXRefAccessors(), however in such 
scenarios we have two choices. We do addXRefAccessors() only for the first creation. Howevere we may have to delay it 
till we are able to do addXRefAccessors() once on a error free .java file. What do you think?

Also I partly consider this a user error and also an unlikely scenario.
Comment 4 _ deva 2007-07-23 23:27:22 UTC
In recent builds, we see a different exception(seems to be same as #110005/#109684) when we try to reproduce this 
problem. Will look into it once the blocking issue is resolved
Comment 5 _ deva 2007-07-27 18:54:26 UTC
Trying to insert code when the model is busted was resulting in NPE

/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/models/FacesModelSet.java,v  <--  FacesModelSet.java
new revision: 1.17; previous revision: 1.16
Comment 6 _ deva 2007-07-27 18:55:42 UTC
Updating the bug status
Comment 7 Yousuf Haider 2007-08-02 18:35:24 UTC
Verified fix on build : 200708011200