users@glassfish.java.net

Deployment of Java EE 5 Web Application using JPA and Toplink failed

From: <glassfish_at_javadesktop.org>
Date: Sun, 20 Apr 2008 10:42:04 PDT

Hello,

I am developing a web app for glassfish v2 with eclipse 3.3.
Deploying of simple hello world servlets works like a charm.

However I can't seem to deploy my app to get data out of my DB.
First the error msg:

[exec] CLI171 Command deploydir failed : Deploying application in domain failed; Deployment Error -- Could not resolve a persistence unit corresponding to the persistence-unit-ref-name [servlet.ImageServlet/emf] in scope of the module called [/Users/rretzbach/Documents/workspace-ee/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/WebGallery]. Please verify your application.

BUILD FAILED
/Users/rretzbach/Documents/workspace-ee/.metadata/.plugins/org.eclipse.jst.server.generic.core/serverdef/sunappsrv-ant.xml:161: The following error occurred while executing this line:
/Users/rretzbach/Documents/workspace-ee/.metadata/.plugins/org.eclipse.jst.server.generic.core/serverdef/sunappsrv-ant.xml:106: exec returned: 1

Total time: 2 seconds

I've looked on several example applications, but can't find the error.

I attached my application as war file and have following questions to find the reason for my deploying problem:

Is the persistence.xml in the correct folder?
Is the content of the persistence.xml correct?
Is the use of the PersistenceUnit annotation in my servlet correct?

If someone has a sample eclipse web application project using jpa it would be nice if he sended it to me :)

Thank you for reading.
Have a nice day.
[Message sent by forum member 'rretzbach' (rretzbach)]

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