gpt4 book ai didi

java - Elasticsearch 与 Hibernate 搜索集成

转载 作者:行者123 更新时间:2023-12-02 11:58:26 26 4
gpt4 key购买 nike

我正在尝试将 Elasticsearch 与 Hibernate Search 集成。

为此我升级了一些版本:

  • JDK 版本 1.7 至 1.8

  • Hibernate ORM 版本 4.1.9 至 5.2.12

  • Hibernate 搜索版本 4.0.0 至 5.8.1

在 runnint 测试时出现错误:

代码:

Caused by: java.util.ServiceConfigurationError: org.hibernate.search.bridge.spi.IndexManagerTypeSpecificBridgeProvider: Provider org.hibernate.search.elasticsearch.bridge.impl.ElasticsearchBridgeProvider not a subtype
at java.util.ServiceLoader.fail(ServiceLoader.java:239)
at java.util.ServiceLoader.access$300(ServiceLoader.java:185)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:376)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.loadJavaServices(ClassLoaderServiceImpl.java:459)
at org.hibernate.search.cfg.impl.DelegatingClassLoaderService.loadJavaServices(DelegatingClassLoaderService.java:74)
at org.hibernate.search.bridge.impl.BridgeFactory.<init>(BridgeFactory.java:65)
at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.<init>(AnnotationMetadataProvider.java:126)
at org.hibernate.search.spi.SearchIntegratorBuilder.initDocumentBuilders(SearchIntegratorBuilder.java:379)
at org.hibernate.search.spi.SearchIntegratorBuilder.createNewFactoryState(SearchIntegratorBuilder.java:243)
at org.hibernate.search.spi.SearchIntegratorBuilder.buildNewSearchFactory(SearchIntegratorBuilder.java:199)
at org.hibernate.search.spi.SearchIntegratorBuilder.buildSearchIntegrator(SearchIntegratorBuilder.java:127)
at org.hibernate.search.hcore.impl.HibernateSearchSessionFactoryObserver.boot(HibernateSearchSessionFactoryObserver.java:113)
at org.hibernate.search.hcore.impl.HibernateSearchSessionFactoryObserver.sessionFactoryCreated(HibernateSearchSessionFactoryObserver.java:79)
at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:35)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:375)
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:452)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:710)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:726)
at org.springframework.orm.hibernate5.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:511)
at org.springframework.orm.hibernate5.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:495)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624)
... 60 more

谁能帮我解决这个问题。

提前致谢。

最佳答案

如果您的依赖项与其他依赖项不内联,我预计会出现此类错误。

您对 hibernate-search orm 和引擎依赖项以及 Elasticsearch 特定模块使用相同的版本吗?

关于java - Elasticsearch 与 Hibernate 搜索集成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47437662/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com