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 70307

Summary: NPE is thrown when generate CMP beans in Freeform project
Product: obsolete Reporter: Petr Blaha <blaha>
Component: EJB FreeformAssignee: Milan Kubec <mkubec>
Status: RESOLVED FIXED    
Severity: blocker CC: pbuzek
Priority: P3    
Version: 5.x   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 66807    
Bug Blocks:    
Attachments: test application
stack trace

Description Petr Blaha 2005-12-13 09:23:46 UTC
[build 20051211]
Steps:
1) import attached cmp2 freeform project
2) add CMP bean from database
ERROR: this exception is thrown java.lang.NullPointerException
        at
org.netbeans.modules.j2ee.sun.share.configbean.SunONEDeploymentConfiguration.ensureResourceDefined(SunONEDeploymentConfiguration.java:395)
Comment 1 Petr Blaha 2005-12-13 09:24:22 UTC
Created attachment 27779 [details]
test application
Comment 2 Petr Blaha 2005-12-13 09:27:54 UTC
It seems that issue isn't related to sunappserv8 -> j2ee 
Comment 3 Petr Blaha 2005-12-13 09:30:18 UTC
Created attachment 27780 [details]
stack trace
Comment 4 Andrei Badea 2005-12-13 09:55:44 UTC
Caused by the EJB freeform project not having a server instance ID, only a
server ID.

We could work around in the CMP wizard by disabling it when the target project
doesn't have a server instance, but before that we should probably rethink the
purpose of the EJB freeform project and the use cases it is supposed to provide.
Could by probably addressed together with issue 66807.
Comment 5 Pavel Buzek 2006-01-05 14:00:13 UTC
I would prefer if the freeform project knew its server type (and instance if
needed) just for configuration purpose. We should also make sure that the CMP
wizard works, albeit without creating server configuration, if there is no
target server.
Not critical for 5.0.
Comment 6 _ pcw 2006-01-05 23:30:38 UTC
The last exception (the one the user would see, not the INFORMATIONAL ones)
shouldn't happen anymore - I fixed that in response to a related IZ issue,
though the user will not be notified that their server resource wasn't created
-- which I suppose is not very good either.
Comment 7 _ pcw 2006-01-05 23:33:02 UTC
Disregard last comment, code inspection suggested there is another place that
could have occurred that is not yet fixed.
Comment 8 Milan Kubec 2006-07-31 13:50:22 UTC
Already fixed by Andrei. The wizard was disabled for EJB freeform project.