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 101556 - Persistence units in an archive are not recognized
Summary: Persistence units in an archive are not recognized
Status: NEW
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker with 1 vote (vote)
Assignee: Sergey Petrov
URL:
Keywords:
: 128480 144795 158096 176747 (view as bug list)
Depends on:
Blocks: 144795
  Show dependency tree
 
Reported: 2007-04-18 12:59 UTC by Erno Mononen
Modified: 2011-11-24 09:31 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erno Mononen 2007-04-18 12:59:20 UTC
Currently the wizards for creating Session Facades for entities and JSF pages 
from entities don't recognize persistence units that packaged to an archive. 
This is a limitation since it is quite usual to have a separate persistence 
archive that contains a persistence.xml file and the entities for the 
persistence units defined in the persistence.xml.
Comment 1 Sergey Petrov 2009-10-06 13:39:36 UTC
*** Issue 158096 has been marked as a duplicate of this issue. ***
Comment 2 Sergey Petrov 2009-11-13 00:12:40 UTC
*** Bug 176747 has been marked as a duplicate of this bug. ***
Comment 3 Sergey Petrov 2009-11-13 00:15:31 UTC
*** Bug 128480 has been marked as a duplicate of this bug. ***
Comment 4 bleathem 2009-11-13 08:51:46 UTC
This bug has been labeled as an "enhancement".  I am unaware of what the consequences are for the different issue types.  Is a "defect" more likely to be fixed than an "enhancement"?  If so, I would argue that this bug is indeed a "defect" and not an "enhancement", as the behavior of the wizard is broken by a perfectly valid (and beneficial) project arrangement.
Comment 5 Sergey Petrov 2009-11-14 09:17:17 UTC
yes, defect is more likely to be fixed, but enhancements are reviewed from time to time and evaluated if new functionality is expected and is good to implement in next release.
but regarding defect vs enhancmenet just consider next levels:
there may be no wizard at all and request for wizard will not be a defect
there is wizard but wizard was implemented to support only pu in current project, the cases are not equal but similar in my opinion.
Comment 6 Sergey Petrov 2010-08-17 09:09:36 UTC
There is SpringBinaryIndexer which solve similar problem(find resources in archives), approach can be used for this issue.

In case of realization need special handling for read-only persistence.xml as some actions/options should not be available for persistence.xml in jars, also need special handling for case persistence.xml in jar + one more at application level.
Comment 7 Petr Jiricka 2010-08-20 09:59:29 UTC
Can I ask what are the exact steps and consequences that cause problems? I was able to to successfully:
1. Create a Java SE library
2. Create some entities from database there (this generated persistence.xml)
3. Create a Web project
4. Add the library project as a library to the Web project
5. Generate JSF pages from entity in the web project (the wizard correctly recognized the entities from the Java SE library)

So what specific scenario does not work?
Comment 8 Erno Mononen 2010-08-20 11:17:26 UTC
When I originally filed this, that was the scenario that I had in mind - at that time it didn't work. Works for me too with 6.9.1.
Comment 9 Sergey Petrov 2011-10-10 10:02:38 UTC
*** Bug 144795 has been marked as a duplicate of this bug. ***