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 168987 - PK Entity from database without Default Constructor
Summary: PK Entity from database without Default Constructor
Status: RESOLVED DUPLICATE of bug 167773
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 6.x
Hardware: All Linux
: P3 blocker (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-22 19:02 UTC by _ henriquemeira
Modified: 2009-07-23 08:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ henriquemeira 2009-07-22 19:02:22 UTC
About "Entity Classes from Database" option:

The NetBeans creates a java class aditional for table with more than one field on primary key. This class don't creates
a default constructor. So, we have the hint: "The class should have a no-arg, public or protected constructor.".

I tested on NB 6.5.1 too. The default constructor is created successfuly.

This problem breaks the excecution, raising the following sample exception:

Exception [EclipseLink-63] (Eclipse Persistence Services - 1.0.1 (Build 20080905)):
org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The instance creation method [desktopapplication1.NfeDetPK.<Default Constructor>], with no
parameters, does not exist, or is not accessible.
Internal Exception: java.lang.NoSuchMethodException: desktopapplication1.NfeDetPK.<init>()
Descriptor: RelationalDescriptor(desktopapplication1.NfeDetPK --> [DatabaseTable(nfe_det)])

regards,

henrique.
Comment 1 Jiri Rechtacek 2009-07-23 08:22:23 UTC
It's not definitely P1 severity.
Comment 2 Sergey Petrov 2009-07-23 08:54:49 UTC

*** This issue has been marked as a duplicate of 167773 ***