users@glassfish.java.net

persistence-unit-ref issue

From: <glassfish_at_javadesktop.org>
Date: Wed, 14 Mar 2007 07:33:45 PST

Hey,

i created a project with Netbeans that includes EJB/WEB modules,

I tried to add in web-xml a persistence-unit-ref as follows:

<persistence-unit-ref>
  <persistence-unit-ref-name>acc_em</persistence-unit-ref-name>
  <persistence-unit-name>pu1</persistence-unit-name>
</persistence-unit-ref>


In deployment time, I get:

Could not resolve a persistence unit corresponding to the persistence-unit-ref-name [acc_em] in scope of the module called []. Please verify your application,


Why is that? I have a persistenence.xml file included in my EJBs module.

I guess the web app cant access the persistence unit named 'pu1' for some reason,


(note: in netbeans i have added the 'ejb-module' as a library my the web-module)

thanks.
[Message sent by forum member 'demiant' (demiant)]

http://forums.java.net/jive/thread.jspa?messageID=207860