jpa - Eclipse RCP, Spring, Hibernate Class Loading Issue -


i’m developing rcp based app uses data access layer implemented using spring data jpa backed hibernate. annotated domain classes in 1 jar/bundle, spring repositories , spring config instantiate datasource, entity manager, , transaction manager in bundle.these jars used other non-rcp apps across project.i have of hibernate 3.6.8 jars , dependencies either wrapped , exposed through own plugins or osgi bundles (jta, antlr, commons collections, etc) in target platform. i’m using eclipse gemini blueprint manage bundle spring contexts within rcp app.

when dal bundle spring context being initialized gemini extender, hibernate related classdefnotfound exceptions, either on org.hibernate.ejb.hibernatepersistence or javax.persistence.spi.persistenceprovider. i’ve tried putting of hibernate jars , dependencies in single plugin exports javax , hibernate packages. i’ve tried setting eclipse buddy policies in manifests of plugins have control over, etc.

i haven’t been able find solution class loading issue between spring , hibernate under eclipse rcp using gemini. i’ve done past hibernate dao projects within rcp putting of hibernate jars in same plugin domain , dao classes, classes exported.

at point don’t think moving more osgi friendly jpa provider openjpa or eclipselink option.

i found answer related question suggested putting of spring jars , dependencies single plugin, hibernate jars , dependencies in plugin buddy policies set. seems dirty when of jars involved osgi bundles.

i suppose create plugin holds dal jar, hibernate jars, , spring orm jars, can see each other.

is there clean way work?

the core bundle if own it, add suspected bundles registered buddies , make sure have defined packages or bundles reuired otherwise buddy class loading not going work. if loading initiated bundle eclipse buddy policy should cascade. other option modify manfiest files in target bundles causing issues.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -