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 189589 - NullPointerException: The connection parameter cannot be null
Summary: NullPointerException: The connection parameter cannot be null
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-17 11:53 UTC by Jan Lahoda
Modified: 2011-04-09 08:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 171985


Attachments
stacktrace (6.89 KB, text/plain)
2010-08-17 11:53 UTC, Jan Lahoda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lahoda 2010-08-17 11:53:21 UTC
Build: NetBeans IDE Dev (Build 100817-92f1f1276ea7)
VM: Java HotSpot(TM) Client VM, 1.6.0_05-ea-b04, Java(TM) SE Runtime Environment, 1.6.0_05-ea-b04
OS: Linux

Stacktrace: 
java.lang.NullPointerException: The connection parameter cannot be null
   at org.openide.util.Parameters.notNull(Parameters.java:89)
   at org.netbeans.modules.j2ee.persistence.provider.ProviderUtil.buildPersistenceUnit(ProviderUtil.java:328)
   at org.netbeans.modules.j2ee.persistence.wizard.Util.buildPersistenceUnitUsingData(Util.java:467)
   at org.netbeans.modules.j2ee.persistence.wizard.fromdb.RelatedCMPWizard.instantiate(RelatedCMPWizard.java:279)
   at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:591)
   at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:412)
Comment 1 Jan Lahoda 2010-08-17 11:53:25 UTC
Created attachment 101447 [details]
stacktrace
Comment 2 Sergey Petrov 2010-08-17 12:17:36 UTC
Can you provide some details? How persistence unit was created?
Comment 3 Jan Lahoda 2010-08-17 12:26:40 UTC
I placed the schema from #187653 to default package of an J2SE project, selected New/Entity Classes from Database from the popup menu on the project. The section radio button was preselected (Database Schema), pressed Add All, next, "foo" into "Package:", Finish. Happens to me always.
Comment 4 Sergey Petrov 2010-08-17 12:32:34 UTC
ok, thanks, I guess as a workaround you may need to have at least one database connection registered in nb, do you have any?
Comment 5 Jan Lahoda 2010-08-17 13:43:06 UTC
I do not have any registered DB connections.
Comment 6 Sergey Petrov 2010-08-31 14:54:42 UTC
thanks, need to open some dialog for connection selection/creation in this case if pu creation is selected, or may be block 'create pu' checkbox as simplest fix in this case, may be with warning/hint message.
Comment 7 Sergey Petrov 2011-04-08 14:36:14 UTC
http://hg.netbeans.org/web-main/rev/2ec5e32fac64 pu will not be created now
Comment 8 Quality Engineering 2011-04-09 08:39:24 UTC
Integrated into 'main-golden', will be available in build *201104090401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/2ec5e32fac64
User: Sergey B. Petrov <sj-nb@netbeans.org>
Log: fix #189589 just remove create pu checkbox if pu creation can't be done without additional steps missed in entities from db wizard