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.
Summary: | JPA needs to automatically add the hibernate jars in project classpath,when its chosen as the persistance provider | ||
---|---|---|---|
Product: | javaee | Reporter: | Vadiraj Deshpande <vadirajvd> |
Component: | Persistence | Assignee: | Dongmei Cao <dongmeic> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | abadea, kganfield |
Priority: | P3 | ||
Version: | 5.x | ||
Hardware: | Sun | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
Vadiraj Deshpande
2008-01-07 05:54:53 UTC
Need to create a new library definition containing the necessary jars (including Hibernate EntityManager jars) for the persistence module to use. The library will be automatically added if Hibernate is selected as the Persistence Provider. Checked in fix in the j2ee.persistence module - http://hg.netbeans.org/main/rev/4d2b121bbf94 Need to fix the hibernatelib module to create the hibernate-jpa library (TBD). As commented in the checkin: The hibernate-jpa library is added by the hibernatelib module, which is one of the Hibernate support modules. The logic here is if the hibernate-jpa library is found, meaning hibernate support modules are installed, then the necessary hibernate jars will be added. If Hiberante support modules are not installed, then the user still needs to add the jars manually as before. I do not want to declare dependency on the hibernatelib module. Sorry, I would like to question this changeset. First, please start by adding the hibernate-jpa library (the name is not important, it just needs to contain the org.hibernate.ejb.HibernatePersistence class). Actually, I would prefer that no library be added -- just add the respective jar to the Hibernate library. Then the Hibernate library should be added to the project just as the TopLink library is added today -- do you know how that works?. Also, if you need to search for the Hibernate library you should do so by searching for a specific class, not by the name. You want to support the user removing the bundled Hibernate library and registering his/her own. Modified the Hibernate Library to have the necessary jars for JPA http://hg.netbeans.org/main?cmd=changeset;node=483e4b888ee3 http://hg.netbeans.org/main?cmd=changeset;node=c6dfa5559bc1 ttp://hg.netbeans.org/main?cmd=changeset;node=0f5797a79360 More fix in the persistence module: http://hg.netbeans.org/main?cmd=changeset;node=1ce22d854222 http://hg.netbeans.org/main?cmd=changeset;node=9c7a28a2c925 So, we'll only automatically add the system defined (or bundled) hibernate library. If the user decides to delete the bundled library, then s/he is on her/his own. Please verify the bunlded Hibernate library is automatically added when Hibernate is selected as Provider |