/** * @return bootstrapServiceRegistry, which is using classloaderService, which is able to find classes from tccl, hibernate * classloader and system classloader */ protected BootstrapServiceRegistry createHibernateBootstrapServiceRegistry() { ClassLoader tccl = Thread.currentThread().getContextClassLoader(); ClassLoader hibernateCl = BootstrapServiceRegistry.class.getClassLoader(); return new BootstrapServiceRegistryBuilder().withApplicationClassLoader(tccl).withHibernateClassLoader(hibernateCl) .build(); }