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.
If entity classes are located in external JAR files instead of the current NetBeans project then the RESTful Web Services from Entity Classes wizard cannot find the persistence unit files and it stops with the message "Current project has no persistence units. Please use New Persistence Unit wizard to create one." The developer has two workarounds: (1) either use the New Persistence Unit wizard to create a persistence.xml file assuming that he/she has the knowledge to do so, or (2) manually merge the contents of the various individual persistence.xml files from each of the external jar files into a single persistence.xml file for the current project.
This phenomena can be demonstrated by building the two NetBeans projects that are associated with the tutorial, "Using Java Persistence API Within a Visual Web JSF Application." The tutorial builds a visual web application (named TestWebApp) that binds a visual component to a JPA entity class that is packaged in another project's jar file (the other project is named TestModelApp). To reproduce this problem, follow the tutorial through to completion and confirm that the visual web application displays the User table contents when it is run. After running the tutorial, use the "Restful Web Services from Entity Classes Wizard" in the TestWebApp project to build the web services. It will be observed that the wizard will not be able to find a persistence unit and will stop prematurely. A workaround can be applied by copying the persistence.xml file from the TestModelApp project's "src/META-INF/" directory to the TestWebApp project's "src/conf/" directory. If the RESTful Services wizard is run again, it will find the persisence.xml file that was copied from the external jar file and will successfuly complete the creation of the REST services.
it may be consider as a duplicate of #101556 or at least it's related.
I'm able to reproduce it. Current wizard REST from Entities uses the same UI that is JPA Controller from entities. It has the same problem.
As it's said current wizard is the sae as in persistence area, and it's unfortunately just isn't supported so far to use/recognize pu from jars. *** This bug has been marked as a duplicate of bug 101556 ***