[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-users] compositePU on OSGi environment
|
Hi,
for a while have a problem to integrate the composite pu concept to my osgi bundle.
I have a persistence bundle which works fine with the underlying pu (single persistence unit). If i try to transform the bundle to works with an composite pu and one member pu as jar as follow:
composite pu (persitence.xml) -> <jar-file>member.jar</jar-file>
The member.jar is not a bundle, only a plain jar file with an META-INF dir and it is located in the root dir of the bundle jar.
Structure of bundle:
member.jar (this is the jar where the member pu persistence.xml is stored in /META-INF)
/META-INF/persistence.xml
...packages...
During start the bundle, the activator class have problem. The EMFactory can't find the persistence provider!?
"javax.persistence.PersistenceException: No Persistence provider for EntityManager named composite-pu"
Have anyone ideas why i've got th exception during bundle start?
Best regards
Alex
My PU:
<persistence-unit name=" composite-pu" transaction-type="RESOURCE_LOCAL">
<jar-file>member.jar</jar-file>
<properties>
<property name="eclipselink.ddl-generation" value="create-or-extend-tables"/>
<property name="eclipselink.logging.level" value="FINEST"/>
<property name="eclipselink.target-server" value="SunAS9"/>
<property name="eclipselink.target-database" value="PostgreSQL"/>
</properties>
</persistence-unit>