| I debugged this kind of case last week. As the exception shows, EnversService is not found. EnversServiceInitiator should create the EnversServiceImpl and EnversServiceContributor should add initiator to service registry. But when StandardServiceRegistryBuilder tries to applyServiceContributors, it does not find EnversServiceContributor. Cause for this might be in BootstrapServiceRegistryBuilder. It creates ClassLoaderServiceImpl in build method because providedClassLoaderService is null. ClassLoaderServiceImpl does not search classes from OSGi service registry, so OSGiClassLoaderServiceImpl should be used instead. OsgiSessionFactoryService seems to correctly create an OSGiClassLoaderServiceImpl instance and set it to BootstrapServiceRegistryBuilder. I think OsgiPersistenceProvider should do same thing also. |