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 173087 - Persistence Unit not possible for local libraries
Summary: Persistence Unit not possible for local libraries
Status: RESOLVED DUPLICATE of bug 171973
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-25 11:13 UTC by fommil
Modified: 2009-09-25 12:02 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 fommil 2009-09-25 11:13:41 UTC
Creation of a Persistence Unit depends on Editor-bundled libraries. It is not possible to select a library from a local library descriptor. Here is the use case:-

- our codebase has a shared repository for all middleware, with an nblibraries.properties descriptor. All projects use this as the libraries folder.
- I have a JPA and a hibernate library defined in this folder
- I create an @Entity and select "create persistence unit"
- If I select Hibernate -> Netbeans Hibernate libraries are copied into my shared folder. I do not want this.
- If I select "manage libraries", only Netbeans global libraries are available, I cannot add my local Hibernate.

Workaround: do not use the Persistence Unit creator wizard. Instead, manually (yuck) create a persistence.xml and set up the libraries.
Comment 1 Max Sauer 2009-09-25 11:33:40 UTC
Reassigning
Comment 2 Sergey Petrov 2009-09-25 11:57:40 UTC
you can replace nb hibernate after creation, 
also currently persistence support only on library for each provider (in eclipselink case for each jpa version) and it's
related to issue 171973 (in my opinion is the same).
as for addition of libraries it's expected behavior helpful in most cases if you don't want to use own jars.
Comment 3 Sergey Petrov 2009-09-25 12:02:05 UTC
looks like a bit modified use case of issue 171973

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