I've pushed the first changes [1] the existing tests pass and I've tested with a small demo application if updating persistence bundles is possible.
When creating an EntityManagerFactory / SessionFactory without changing TCCL to the OsgiClassLoader I still get a stack trace [2] is this to be expected?
1: https://github.com/brampouwelse/hibernate-orm/commit/3f05a28c47cc34f45d32aff3d61ad7b6ddd3c2b9
2:
java.lang.ClassNotFoundException: org.hibernate.osgi.test.client.DataPoint not found by org.hibernate.core [76]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.hibernate.internal.util.ReflectHelper.classForName(ReflectHelper.java:175)
at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:115)
at org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactory.java:314)
at org.hibernate.tuple.PropertyFactory.buildIdentifierAttribute(PropertyFactory.java:62)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:139)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:500)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:122)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:96)
at org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:77)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:342)
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:445)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:779)
at org.hibernate.osgi.OsgiPersistenceProvider.createEntityManagerFactory(OsgiPersistenceProvider.java:80)
at org.hibernate.osgi.test.OsgiIntegrationTest.testJpa(OsgiIntegrationTest.java:211)
|