When i migrated one of my Hibernate Search project from Spring Boot 2.2.7.RELEASE to 2.3.0.RELEASE, application started facing deadlock during the very startup.
I can not see any error in the logs either.
My sample project is here:
https://github.com/cancerian0684/listing-service
If i rollback Spring Boot 2.3.0 to 2.2.7, everything started working fine again. Is there a known issue in using Hibernate Search (tried both 5.x and 6.0.0.Beta8) with Spring Boot 2.3.0?
Spring Boot 2.3 switched to deferred JPA initialization and that leads to some issue, Hibernate Search being one of them. You should be able to get it back working using the following property
spring.data.jpa.repositories.bootstrap-mode=default
See this issue for some more context.
Related
I am working ina Hibernate Search application and I am trying to use version 6 (which right now is in beta). I followed all the instructions and documentation in https://docs.jboss.org/hibernate/search/6.0/reference/en-US/html_single/#getting-started-configuration
After trying to start my application I get next error:
I have looked in Google and seems to be I am the first person in the world who is facing this issue.
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.hibernate.search.mapper.orm.mapping.impl.HibernateOrmIndexedTypeContext.<init>(HibernateOrmIndexedTypeContext.java:35)
The following method did not exist:
org.hibernate.metamodel.spi.MetamodelImplementor.entity(Ljava/lang/Class;)Lorg/hibernate/metamodel/model/domain/spi/EntityTypeDescriptor;
It was loaded from the following location:
file:/home/myUser/.m2/repository/org/hibernate/hibernate-core/5.3.11.Final/hibernate-core-5.3.11.Final.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of org.hibernate.metamodel.spi.MetamodelImplementor
Any idea of how to solve it?, In my application I am working with Spring boot and jpa.
As indicated here in the documentation, Hibernate Search 6.0.0.Beta2 requires Hibernate ORM 5.4.7.Final or later. You are using Hibernate ORM 5.3.11.Final.
I think Spring Boot 2.1 ships with ORM 5.3, so that's probably what you're using.
The best course of action would be to upgrade to Spring Boot 2.2.1.RELEASE, which ships with Hibernate ORM 5.4.
If that's not possible, you can still stay with Spring Boot 2.1 and override the version of Hibernate ORM directly in your POM: from what I've seen, it works rather well in Spring Boot 2.1.
Just set this property in your POM:
<properties>
<!-- Override the version of Hibernate ORM in Spring Boot -->
<hibernate.version>5.4.7.Final</hibernate.version>
</properties>
Note that technically, any version after Hibernate ORM 5.4.4.Final should work, but sticking to the version Hibernate Search was tested with is usually safer.
We just trying to migrate our app from Spring boot 2.0.4 to 2.1.6 and some of the functionalities on our app are not working especially where we have used jpa repository's saveandflush method it started throwing constraint violation exception on the table that it is trying to saveandflush, can someone help me what got changed in these two versions ?
I was trying to make spring boot batch application(2.0.0.RC1) work with Spring cloud starter task(2.0.0.M2).
Getting a range of errors while making Spring cloud starter task work with spring boot 2.x batch application.
I was able to run batch applicationspring-boot-starter-parent(1.5.10.RELEASE) with Spring cloud starter task(2.0.0.M2) successfully.
Here is the screeenshot
But when I tried Spring cloud starter task(2.0.0.M2) with spring boot 2.0.0.RC1, I am getting following error.
com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Could not resolve type id '' into a subtype of [simple type, class java.lang.Object]:
Here is the screenshot of the same.
So I decided to downgrade Spring boot to 2.0.0.M7.Alas I am getting a different exception.
java.lang.IllegalStateException: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#61f78561 has been closed already.
Why this exceptions happens?Any help/guide would be appreciated.
There have been quite a few upstream changes in Spring Boot, which caused side effects in Spring Cloud Task's 2.0.
We have had a all of them resolved (some in Boot itself) - see here.
We are targeting a 2.0 M3 release this week, so until that is done, perhaps you could try building 2.0 BUILD-SNAPSHOT locally. If you see any other anomaly, please let us know.
I was able to connect to Elastic Serarch 5.5.0 using spring-data-elasticsearch 3.0.0.RC2.
I want to convert my app into a spring boot application. I tried Spring Boot version 2.0.0.M2 , but I got the below error
Caused by: java.lang.NoSuchMethodError: org.springframework.data.elasticsearch.c
ore.mapping.ElasticsearchPersistentProperty.findAnnotation(Ljava/lang/Class;)Lja
va/lang/annotation/Annotation;
at org.springframework.data.elasticsearch.core.mapping.SimpleElasticsear
chPersistentEntity.addPersistentProperty(SimpleElasticsearchPersistentEntity.jav
a:157) ~[spring-data-elasticsearch-3.0.0.RC2.jar!/:?]
at org.springframework.data.elasticsearch.core.mapping.SimpleElasticsear
chPersistentEntity.addPersistentProperty(SimpleElasticsearchPersistentEntity.jav
a:47) ~[spring-data-elasticsearch-3.0.0.RC2.jar!/:?]
at org.springframework.data.mapping.context.AbstractMappingContext$Persi
stentPropertyCreator.createAndRegisterProperty(AbstractMappingContext.java:559)
~[spring-data-commons-2.0.0.M4.jar!/:?]
at org.springframework.data.mapping.context.AbstractMappingContext$Persi
stentPropertyCreator.doWith(AbstractMappingContext.java:528) ~[spring-data-commo
ns-2.0.0.M4.jar!/:?]
at org.springframework.util.ReflectionUtils.doWithFields(ReflectionUtils
.java:727) ~[spring-core-5.0.0.RC2.jar!/:5.0.0.RC2]
As per the below link version matrix , spring boot is not available for Elastic Search 5 version.
https://github.com/spring-projects/spring-data-elasticsearch/wiki/Spring-Data-Elasticsearch---Spring-Boot---version-matrix
But I feel this matrix is out dated since spring-data-elasticsearch has already started to support ElasticSearch-5.5.0
Let me know if you could successfully run spring-data-elasticsearch connecting to Elastic Search 5 using Spring Boot .
It works fine when I upgraded spring-boot-starter-parent to 2.0.0.M3
I recently deployed a spring boot 1.4.0 web application and I noticed that liquibase did not perform an update. I have no problem with my spring boot 1.3.2 web application.
Was something introduced to Spring Boot 1.4.0 that would cause liquibase to not execute?
Tracked down the issue to liquibase-core package was not included in order to the Spring Boot autoconfigurations to execute.
It's not entirely clear why the liquibase-gradle-plugin did not include the required package.