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 151279

Summary: [65cat] NullPointerException at org.netbeans.modules.web.jsf.wizards.JSFClientGenerator$10.run
Product: javaee Reporter: wobster <wobster>
Component: JSFAssignee: Matthew Bohm <mbohm>
Status: RESOLVED INVALID    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=132865
Issue Type: DEFECT Exception Reporter: 132865
Attachments: stacktrace

Description wobster 2008-10-24 13:47:30 UTC
Build: NetBeans IDE Dev (Build 200810240201)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-rc2-b32
OS: Windows XP, 5.1, x86

User Comments:
wobster: still getting null pointer exception during generation of JSF classes from JPA



Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.web.jsf.wizards.JSFClientGenerator$.run(JSFClientGenerator.java:911)
        at org.netbeans.modules.web.jsf.wizards.JSFClientGenerator$.run(JSFClientGenerator.java:908)
        at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:680)
        at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:607)
        at org.netbeans.modules.web.jsf.wizards.JSFClientGenerator.generateConverter(JSFClientGenerator.java:907)
        at org.netbeans.modules.web.jsf.wizards.JSFClientGenerator.generateJSFPages(JSFClientGenerator.java:349)
Comment 1 wobster 2008-10-24 13:47:35 UTC
Created attachment 72600 [details]
stacktrace
Comment 2 _ potingwu 2008-10-24 17:06:44 UTC
"eneration of JSF classes from JPA" issue.
Comment 3 Matthew Bohm 2008-10-24 22:16:37 UTC
Most likely, one of your entities lacks a getter method for the id field.

Please clean, zip, and attach the project so I can take a look.
Comment 4 wobster 2008-10-26 16:38:59 UTC
It would be nice if the tool did not throw a NPE when it could not find a getter for a given field. It'd be preferable
to pop a dialog box that informed the user that the field requires a JavaBeans style getter. 

In my case, I had some code where the bean did not follow the JavaBean pattern exactly and caused the NPE. (I fixed the
problem and the bug went away.)
Comment 5 Matthew Bohm 2008-10-27 21:57:26 UTC
OK, will add it to the planning document.