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.
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.
Reassigning
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.
looks like a bit modified use case of issue 171973 *** This issue has been marked as a duplicate of 171973 ***