I try to create JPA persistency module and access it from OSGI WAB in glassfish 3.1. The way to do it in non-OSGI WAR is to copy the persistency jar into WAR.
However when I deploy the OSGI WAB with jpa jar, I get the exception:
[#|2011-02-01T18:29:10.035+0200|SEVERE|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-1;|java.lang.RuntimeException: java.util.zip.ZipException: duplicate entry: META-INF/maven/com.test/test-web/pom.properties at org.glassfish.osgijavaeebase.OSGiBundleArchive$1.run(OSGiBundleArchive.java:366)
Should the JPA jar contain some special entries in a manifest? It must be defined as OSGI bundle? Please consult.
Update: The issues was resolved:
- To avoid ZipException, I removed the "." from Bundle-Classpath in bundle Manifest.
- To get more detailed logs with exceptions, I upgraded Glassfish 3.1 build to 41 (I was working with build 35).
- JPA with Hibernate inside bundle started to work after I fixed several classpath problems