Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/kotlin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 弹簧靴&x2B;hibernate搜索:entityManagerFactory依赖项错误_Java_Spring_Hibernate_Spring Boot_Hibernate Search - Fatal编程技术网

Java 弹簧靴&x2B;hibernate搜索:entityManagerFactory依赖项错误

Java 弹簧靴&x2B;hibernate搜索:entityManagerFactory依赖项错误,java,spring,hibernate,spring-boot,hibernate-search,Java,Spring,Hibernate,Spring Boot,Hibernate Search,我在Spring Boot应用程序启动时遇到了这个问题 结果是: 警告8532---[main]o.h.s.a.i.LuceneEmbeddedAnalyzer策略:HSEARCH000075:未指定配置设置hibernate.search.lucene\u版本:当前正在使用lucene\u。 警告8532---[main]ationConfigEmbeddedWebApplicationContext:在上下文初始化期间遇到异常-取消刷新尝试:org.springframework.beans

我在Spring Boot应用程序启动时遇到了这个问题

结果是:

警告8532---[main]o.h.s.a.i.LuceneEmbeddedAnalyzer策略:HSEARCH000075:未指定配置设置hibernate.search.lucene\u版本:当前正在使用lucene\u。 警告8532---[main]ationConfigEmbeddedWebApplicationContext:在上下文初始化期间遇到异常-取消刷新尝试:org.springframework.beans.factory.BeanCreationException:使用类路径资源中定义的>名称“entityManagerFactory”创建bean时出错[org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]:init方法调用失败;嵌套异常为java.lang.NoSuchMethodError:>org.hibernate.engine.spi.SessionFactoryImplementor.getProperties()Ljava/util/Properties; 信息8532---[main]o.apache.catalina.core.StandardService:停止服务[Tomcat] 信息8532---[main]自动配置报告记录初始值设定项:

启动ApplicationContext时出错。若要显示自动配置报告,请在启用“调试”的情况下重新运行应用程序。 错误8532---[main]o.s.boot.SpringApplication:应用程序启动失败

org.springframework.beans.factory.BeanCreationException:创建名为“entityManagerFactory”的bean时出错,该bean在类路径资源[org/springframework/boot/autoconfigure/orm/jpa/hibernatejpaaautoconfiguration.class]中定义:调用>init方法失败;嵌套异常为java.lang.NoSuchMethodError:org.hibernate.engine.spi.SessionFactoryImplementor.getProperties()Ljava/util/Properties; 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1628)~[spring-beans-4.3.9.RELEASE.jar!/:4.3.9.RELEASE] 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)~[spring-beans-4.3.9.RELEASE.jar!/:4.3.9.RELEASE] 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)~[spring-beans-4.3.9.RELEASE.jar!/:4.3.9.RELEASE] 在org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)~[spring-beans-4.3.9.RELEASE.jar!/:4.3.9.RELEASE] 在org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)~[spring-beans-4.3.9.RELEASE.jar!/:4.3.9.RELEASE] 在org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)~[spring-beans-4.3.9.RELEASE.jar!/:4.3.9.RELEASE] 在org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)~[spring-beans-4.3.9.RELEASE.jar!/:4.3.9.RELEASE] 在org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1078)~[spring-context-4.3.9.RELEASE.jar!/:4.3.9.RELEASE] 在org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:857)~[spring-context-4.3.9.RELEASE.jar!/:4.3.9.RELEASE] 在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)~[spring-context-4.3.9.RELEASE.jar!/:4.3.9.RELEASE] 在org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)~[spring-boot-1.5.4.RELEASE.jar!/:1.5.4.RELEASE] 在org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)[spring-boot-1.5.4.RELEASE.jar!/:1.5.4.RELEASE] 在org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)[spring-boot-1.5.4.RELEASE.jar!/:1.5.4.RELEASE] 在org.springframework.boot.SpringApplication.run(SpringApplication.java:303)[spring-boot-1.5.4.RELEASE.jar!/:1.5.4.RELEASE] 在org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)[spring-boot-1.5.4.RELEASE.jar!/:1.5.4.RELEASE] 在org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)[spring-boot-1.5.4.RELEASE.jar!/:1.5.4.RELEASE] 在com.closdeal.restService.RestServiceApplication.main(RestServiceApplication.java:20)[classes!/:na] 在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)~[na:1.8.0_144] 在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)~[na:1.8.0144] 在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)~[na:1.8.0144] 在java.lang.reflect.Method.invoke(Method.java:498)~[na:1.8.0_144] 位于org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)[closdeal-rest-service-1.0.2.jar:na] 在org.springframework.boot.loader.Launcher.launch(Launcher.java:87)[closdeal-rest-service-1.0.2.jar:na] 在org.springframework.boot.loader.Launcher.launch(Launcher.java:50)[closdeal-rest-service-1.0.2.jar:na] 位于org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)[closdeal-rest-service-1.0.2.jar:na] 原因:java.lang.NoSuchMethodError:org.hibernate.engine.spi.SessionFactoryImplementor.getProperties()Ljava/util/Properties; 在org.hibernate.jpa.internal.EntityManagerFactoryImpl.(EntityManagerFactoryImpl.java:124)~[hibernate-entitymanager-5.0.12.Final.jar!/:5.0.12.Final] 在org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:890)~[hibernate-entitymanager-5.0.12.Final.jar!/:5.0.12.Final] 位于org.springframework.orm.jpa。
dependencies {
    //Spring
    compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '1.5.7.RELEASE'
    compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-rest', version: '1.5.7.RELEASE'
    compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: '1.5.7.RELEASE'
    compile group: 'org.springframework.security', name: 'spring-security-data', version: '4.2.3.RELEASE'
    compile group: 'org.springframework.security.oauth', name: 'spring-security-oauth2', version: '2.1.1.RELEASE'
    compile group: 'org.springframework.data', name: 'spring-data-rest-hal-browser', version: '3.0.0.RELEASE'

    //Hibernate
    compile group: 'org.hibernate', name: 'hibernate-core', version: '5.2.11.Final'
    compile group: 'org.hibernate', name: 'hibernate-spatial', version: '5.2.11.Final'
    compile group: 'org.hibernate', name: 'hibernate-search-orm', version: '5.8.1.Final'
//    compile group: 'org.hibernate.javax.persistence', name: 'hibernate-jpa-2.1-api', version: '1.0.0.Final'

    //JSON
    compile("org.codehaus.jackson:jackson-mapper-asl")

    //Bases de datos
    compile("com.h2database:h2")
    compile group: 'mysql', name: 'mysql-connector-java', version: '8.0.7-dmr'

    //Utilerías varias
    compile group: 'commons-io', name: 'commons-io', version: '2.5'
    compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.6'
    compile group: 'org.apache.commons', name: 'commons-text', version: '1.1'
    compile group: 'commons-codec', name: 'commons-codec', version: '1.10'
    compile group: 'commons-validator', name: 'commons-validator', version: '1.6'
    compile group: 'net.glxn', name: 'qrgen', version: '1.4'
    compile group: 'com.vividsolutions', name: 'jts', version: '1.13'


    //Test
    testCompile("org.junit.jupiter:junit-jupiter-api:5.0.0")
    testRuntime("org.junit.jupiter:junit-jupiter-engine:5.0.0")
    testCompile("org.junit.platform:junit-platform-runner:1.0.0")

    testCompile('org.springframework.boot:spring-boot-starter-test')
}
public Map<String, Object> getProperties();
dependencyManagement {
    imports {
        mavenBom 'org.springframework.boot:spring-boot-dependencies:1.5.8.RELEASE'
    }
}

dependencies {
    //Spring
    compile group: 'org.springframework.boot', name: 'spring-boot-starter-web'
    compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-rest'
    compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa'
    compile group: 'org.springframework.security', name: 'spring-security-data'
    compile group: 'org.springframework.security.oauth', name: 'spring-security-oauth2'
    compile group: 'org.springframework.data', name: 'spring-data-rest-hal-browser'

    //Hibernate
    compile group: 'org.hibernate', name: 'hibernate-core', version: '5.1.10.Final'
    compile group: 'org.hibernate', name: 'hibernate-spatial', version: '5.1.10.Final'
    compile group: 'org.hibernate', name: 'hibernate-search', version: '5.6.3.Final'
    compile group: 'org.hibernate', name: 'hibernate-search-engine', version: '5.6.3.Final'
    compile group: 'org.hibernate', name: 'hibernate-search-orm', version: '5.6.3.Final'

    //JSON
    compile("org.codehaus.jackson:jackson-mapper-asl")

    //Bases de datos
    compile("com.h2database:h2")
    compile group: 'mysql', name: 'mysql-connector-java', version: '8.0.7-dmr'

    //Utilerías varias
    compile group: 'commons-io', name: 'commons-io', version: '2.5'
    compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.6'
    compile group: 'org.apache.commons', name: 'commons-text', version: '1.1'
    compile group: 'commons-codec', name: 'commons-codec', version: '1.10'
    compile group: 'commons-validator', name: 'commons-validator', version: '1.6'
    compile group: 'net.glxn', name: 'qrgen', version: '1.4'
    compile group: 'com.vividsolutions', name: 'jts', version: '1.13'


    //Test
    testCompile("org.junit.jupiter:junit-jupiter-api:5.0.0")
    testRuntime("org.junit.jupiter:junit-jupiter-engine:5.0.0")
    testCompile("org.junit.platform:junit-platform-runner:1.0.0")

    testCompile('org.springframework.boot:spring-boot-starter-test')
}