Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] compositePU on OSGi environment

Hi Andrei,

my fault, i forget the  <property name="eclipselink.composite-unit.member" value="true"/> in the first post
But also with this entry it doesnt work :-(

Alex


2013/3/12 Andrei Ilitchev <andrei.ilitchev@xxxxxxxxxx>
Composite persistence unit is not configured correctly,
please see
http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Advanced_JPA_Development/Composite_Persistence_Units


On 3/12/2013 9:06 AM, Alexander Kley wrote:
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>


_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top