Amaltas,

Jetty itself doesn't find or read the persistence.xml file, that's
something that is done by the jpa.

I think maybe the jpa is expecting to find the persistence file inside
a jar file, so have you tried putting it inside a jar file in
WEB-INF/lib? If that doesn't work, then you might need to track down
the doco on the jpa impl and check where it is prepared to look for
its initialization file.

cheers
Jan

On 6 December 2011 12:19, Amaltas <amal...@amaltas.org> wrote:
> Hi,
> I am using embedded jetty and the directory structure of the executable jar
> file is:
>
> /com/myproject/frontend/FrontendMain.java
> /com/myproject/frontend/servlets/HelloServlet.java
> /WEB-INF/classes/META-INF/persistence.xml
> /libs/*.jar
>
> The Main-Class is com.myproject.frontend.FrontendMain. I set appropriate
> class-paths in manifest files, but the openjpa cannot find persistence.xml
> file.
>
> I have tried everything like copying persistence.xml in the following
> folders:
> /WEB-INF/persistence.xml
> /META-INF/persistence.xml
> /persistence.xml
> /lib/persistence.xml
>
> Please note that its pure embedding, everything is set programmatically, so
> no war architecture is involved.
>
> I have been trying all weekend but with no success. I really want to use
> embedded jetty in my project, but if JPA doesn't work, I will have to try
> tomcat unfortunately.
>
> Thanks
>
> _______________________________________________
> jetty-users mailing list
> jetty-users@eclipse.org
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
_______________________________________________
jetty-users mailing list
jetty-users@eclipse.org
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to