NB6.5 New JSF Pages from Entity Classes and Attempt to use a Persistence Unit in a different Project add in Properties Library

View: New views
2 Messages — Rating Filter:   Alert me  

NB6.5 New JSF Pages from Entity Classes and Attempt to use a Persistence Unit in a different Project add in Properties Library

by rdblaha1 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The problem I am up against is I have an existing Project which holds my entities and Persistence Unit.  I am creating a JSF Project loosely based on the tutorial "Generating a JavaServerFaces CRUD Application from a Database".  The difference from the tutorial is tha I already have a project with the required entities and persistence unit.   As I step through to create the "New JSF Pages from Entity Classes" I find what I believe is probably a bug.   All my entities from my other project in the library are displayed, but the error message is displayed, "The project does not have a persistence unit.  You need a persistence unit to persist entity classes."  Now how can it show my entities from my existing persistence unit, but not 'find' my existing persistence unit?

I have searched this forum and found references to situations somewhat, but not quite exactly like this.  The results were definitely different in that they all referred to NB5.5 and NB6.1.  If I missed a thread that addresses this, please point me to that thread.


Re: NB6.5 New JSF Pages from Entity Classes and Attempt to use a Persistence Unit in a different Project add in Properties Library

by rdblaha1 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

 Now how can it show my entities from my existing persistence unit, but not 'find' my existing persistence unit?
I rephrase the question to hopefully convey my main concerns.

1)  Is it a bug that my entities from my project with the entities and persistence unit are displayed in the situation previously described while the persistence unit is not found?

2) Whether it is a bug or not, how can I use a persistence unit from another project with its entities?

My purpose is so I can use one entity/persistence unit project in other projects so I don't have to rebuild entities and persistence units everytime I need to access the exact same tables.

Thank you.