EHCache with Hibernate Integration Throwing CacheException - spring

I am facing issue in integrating Hibernate And EHCache. I am using Hibernate 3.2.7 GA, Hibernate Annotation 3.2.1 ga,hibernate-commons-annotations 3.2.0.Final, net.sf.ehcache 2.2.0 and Spring version 3.2.4.RELEASE. When I ran my test case I am getting
net.sf.ehcache.CacheException: Error configuring from /content/cache/ehcache.xml. Initial cause was Error configuring from input stream. Initial cause was null:19: Element does not allow attribute "maxEntriesLocalHeap".
In Hibernate config file i have put
true
Please help me to solve the issue. I am new to EHCache.

Fairly confident the 2.2 version of Ehcache doesn't support that maxEntriesLocalHeap. Any reason you're using such an old version?
You either need to use a newer one, or modify your ehcache.xml to comply to the 2.2 XSD

Related

Hibernate version compatibility with Spring 5.3.22

I would like to find out what is the compatible version of hibernate core and validator for spring version 5.3.22. I tried to search for the spring-orm 5.3.22 pom xml file in the .m2\repository\org\springframework\spring-orm, but it did not show any information related hibernate. I have tried using 5.3.22.RELEASE, but the result stays the same. Are there any approach that I can use to determine the compatible version? Thank you in advance.

Spring boot 2.2.7 migration breaks Jaxb unmarshal

I have a Java 11 application that works perfectly fine with Spring Boot v2.2.6.RELEASE, but it breaks when I upgrade to v2.2.7.RELEASE. The problem is that I get a java.lang.NullPointerException when reading the nested object:
jaxbUnmarshaller.unmarshal(new StringSource(xml)).getChild().foo();
I checked the SB release notes and this seems to be the breaking change: https://github.com/spring-projects/spring-boot/issues/21195
As migrating from Glassfish Jaxb 2.3.2 to 2.3.3 is a patch change, I would expect that this upgrade should require no changes from my side. I tried to check for some migration guide but found nothing at jaxb-ri page. Any idea would be welcome.
This sounds like a bug in the JAXB reference implementation. If you haven't already done so, I would search the RI's open issues for an existing report of your problem. If you don't find anything, I would then open an issue that describes your problem and includes a minimal sample that works with 2.3.2 and fails with 2.3.3.

Hibernate Search breaks with Spring Boot 2.3.0

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.

Spring 4.3.0.RELEASE, Hibernate 5.0.9.Final, missing SessionFactoryImplementor.getProperties method

I am using Spring 4.3.0.RELEASE together with Hibernate 5.0.9.Final in my app and I keep getting
java.lang.NoSuchMethodError: org.hibernate.engine.spi.SessionFactoryImplementor.getProperties()Ljava/util/Map;
If I update the Hibernate 5.2.0.Final, everything works fine. It seems that Spring 4.3.0 is not compatible with Hibernate 5.0, is that correct ? I was not able to find anything about not supporting Hibernate 5.0.
In Hibernate 5.2, such method exists, in Hibernate 5.0 the method doesn't exist yet (just replace 5.2 with 5.0 in URL):
http://docs.jboss.org/hibernate/orm/5.2/javadocs/org/hibernate/engine/spi/SessionFactoryImplementor.html
I have created simple reproducer:
https://github.com/trepel/spring43-hibernate50-error
Thanks for all your replies.
There is already an issue, SPR-14365, covering that.

No log messages after Spring Boot upgrade

I have recently upgraded spring boot from 1.1.10 to 1.2.0. I did not specify version information for spring boot dependencies like spring mvc. So they also got upgraded.
After upgrade, I am not able to see any log information from spring.
I am able to see the sysout and syserr information of my code though.
Did any thing change in the latest relese ?
As per the changelog Spring Boot 1.2.0 changelog Spring Boot's default behavior is to not write any log files.
Sorry folks, I have a log4j.properties in my class path. That configuration file prevented entries from springframework packages. Not sure how it ended up there though. Probably 1.1.10 is not picking it up. Things might have changed with 1.2.0. Hence the problem. Once I deleted that file, every thing is working fine
Thank you for your time

Resources