Spring boot and Hibernate session context

ZeroTurnaround Homepage Forums JRebel Support Spring boot and Hibernate session context

Tagged: , ,

This topic contains 1 reply, has 2 voices, and was last updated by  Valerie Avramenko 4 months, 2 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #62653

    This is my SpringBoot app with @Bean configuration for SessionFactory:

    public class BooksListApplication {
    	public static void main(String[] args) {
    		SpringApplication.run(BooksListApplication.class, args);
    	public SessionFactory sessionFactory(HibernateEntityManagerFactory hemf) {
    		return hemf.getSessionFactory();

    my configuration:

    spring.datasource.url= jdbc:postgresql://localhost:5432/books

    And my Dao class:

    public abstract class AbstractDao<T> implements CrudRepository<T, Long> {
        private SessionFactory sessionFactory;
        public <S extends T> S save(S entity) {
            return entity;

    save() method ends up with org.hibernate.HibernateException: No CurrentSessionContext configured!

    because configuration:


    is never loaded. It works fine with IntelliJ defult deburger. Problem exists onlny while running with JRebel debuger.

    Property should be loaded in org.hibernate.internal.SessionFactoryImpl:1219 from hibernate 5.0.12 but it loads as null


    Valerie Avramenko
    Rebel Staff

    [To see what causes the issue we would’ve needed the jrebel.log file, but after asking it in a private conversation, user didn’t come back to us. So the case was closed on our side]

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.