Reputation: 5099
I have an application with a Database module which contains the persistence.xml file along with entities and controller classes. During Maven tests it passed all tests so I believe it is well configured. When running the application it complains that it can't find the persistence unit. I verified that it is in the respective nbm's META-INF folder in the application folder being ran.
Any idea? Anything special to make it work?
Edit: Code can be found here in the Marauroa-Server-Manager folder.
Upvotes: 1
Views: 355
Reputation: 5099
I was lead to the answer by Timon Veenstra. This is a placeholder for the answer in case Timon doesn't have an account so I can credit him with the answer and for anyone else running accros this question.
The key was making sure that the Persistence API, Persistence Implementation (Eclipselink on my case) and the database driver were wrapped in NetBeans modules. After that everything started working.
I guess Maven/NetBeans is misleading on that aspect since the modules compile if you have appropriate dependencies.
Upvotes: 1