问题描述
- hibernate整合,启动报错!
-
Caused by: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.search.hcore.impl.HibernateSearchIntegrator could not be instantiated
at java.util.ServiceLoader.fail(Unknown Source)
at java.util.ServiceLoader.access$100(Unknown Source)
at java.util.ServiceLoader$LazyIterator.next(Unknown Source)
at java.util.ServiceLoader$1.next(Unknown Source)
at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.loadJavaServices(ClassLoaderServiceImpl.java:251)
at org.hibernate.integrator.internal.IntegratorServiceImpl.(IntegratorServiceImpl.java:53)
at org.hibernate.service.internal.BootstrapServiceRegistryImpl.(BootstrapServiceRegistryImpl.java:80)
at org.hibernate.service.internal.BootstrapServiceRegistryImpl.(BootstrapServiceRegistryImpl.java:57)
at org.hibernate.service.ServiceRegistryBuilder.(ServiceRegistryBuilder.java:76)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1773)
at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:242)
at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:372)
at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:357)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
... 34 more
Caused by: java.lang.NoClassDefFoundError: org/hibernate/search/util/logging/impl/LoggerFactory
at org.hibernate.search.hcore.impl.HibernateSearchIntegrator.(HibernateSearchIntegrator.java:33)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
... 47 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.search.util.logging.impl.LoggerFactory
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
... 53 more
解决方案
hibernate和struts2整合报错
报错:spring整合Hibernate
hibernate映射文件报错
解决方案二:
你的sessionFactory配置的有问提,导致了引用sessionFactory报错。
时间: 2024-11-08 20:07:00