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 130858 - Using Entity Class wizard without creating PU leads to missing JPA interface errors
Summary: Using Entity Class wizard without creating PU leads to missing JPA interface ...
Status: RESOLVED DUPLICATE of bug 75948
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P4 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-23 12:58 UTC by jlaskowski
Modified: 2008-04-02 12:53 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 jlaskowski 2008-03-23 12:58:24 UTC
1/ Create a new Java Class Library
2/ Create a new Entity Class
3/ Disregard the advice to create a PU and finish the wizard => java class errors because no JPA interfaces/classes are
found (no JPA libs added).
Comment 1 Andrei Badea 2008-03-23 20:32:06 UTC
The Entity Class wizard is supposed to do just that -- create an entity class. Sorry. You can easily add the persistence
library by right-clicking the Libraries node and choosing the Add Library action.
Comment 2 jlaskowski 2008-03-24 00:29:17 UTC
Entity Class wizard is to create a class with JPA annotations. Why can't the wizard add a JPA provider library
regardless of whether persistence.xml is created or not? Let the JPA library be added every time *or* don't let the user
go on unless a persistence.xml file exists. One or another - the current solution is unacceptable from a user's point of
view.
Comment 3 Andrei Badea 2008-03-24 19:00:36 UTC
Adding the library without the user's explicit request is not a good idea -- the user might want to use another JPA
library than TopLink. Not letting the user go on without a persistence.xml file is not good either, it would prevent the
user from creating an entity class in a library of entity classes (for which persistence.xml is provided separately).

An idea could be to give the user two options:
- to create persistence.xml (and add a persistence library to the classpath)
- to add the library only

But this requires a non-trivial UI change, so it is not for 6.1. And I can't consider it a P3 issue, since the
workaround is trivial.
Comment 4 Rochelle Raccah 2008-03-25 01:47:18 UTC
I think this may be a duplicate of 75948, which is a P3 defect and has multiple duplicates as well.
Comment 5 Andrei Badea 2008-04-02 12:53:06 UTC
Right, thanks.


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