OSGI Bundle implementing JPA Using DataNucleus 4.0.0 Release -
i trying implement jpa using datanucleus in osgi environment (apache servicemix). following guide mentioned here - http://www.datanucleus.org/products/datanucleus/jpa/osgi.html (section under name "jpa , osgi") per documentation here using datanucleus jpa jar. have deployed jar on servicemix follows -
osgi:install mvn:org.datanucleus/datanucleus-jpa/2.1.7
osgi:start bundleid
as jar export persistence provider,i have correctly changed provider in persistence.xml file org.datanucleus.jpa.persistenceproviderimpl (which exported above bundle) rather usual org.datanucleus.api.jpa.persistenceproviderimpl in normal j2ee jpa app.
i have datanucleus core bundle running on servicemix, installed on servicemix using following -
osgi:install mvn:org.datanucleus/datanucleus-core/4.0.0-release
osgi:start bundleid
please note: donot have datanucleus-api-jpa bundle running on servicemix, per documentation, datanucleus-jpa bundle export necessary classes , hence datanucleus-api-jpa bundle not required.
at runtime, getting following error caused by: java.lang.classnotfoundexception: org.datanucleus.persistenceconfiguration not found org.datanucleus.jpa [261]
what have noticed datanucleus core version 4.0.0-release not have class, class exists in previous releases (3.2.15).
i cannot deploy datanucleus core version 3.2.xx onto servicemix, because have other bundles using datanucleus core 4.0.0-release , having both not option because of singleton creation problems.
please let me know, if need me post code, so. please
cheers, abhijit
in conclusion, using incorrect/invalid jars. "datanucleus-jpa" removed in v2 of datanucleus. recent versions using "datanucleus-api-jpa" (or "datanucleus-api-jdo" if using jdo). simple download of datanucleus zip file 4.0.x show clearly.
Comments
Post a Comment