Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Using OpenJPA in embedded Jetty, cannot find persistence.xml

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

Back to the top