No session repository could be auto-configured, check your configuration (session store type is 'null')

30,510

You have Spring Session on your classpath and no store was provided. We can't take that decision for you as if your classpath changes, the store type may change according to our preferences and you'd lose them without any sort of warning.

Historically we only supported redis so if you have that we'll use it transparently. Please set spring.session.store-type to the store you want to use for Spring Session. If Spring Session is on your classpath and you don't want to use it right now, set spring.session.store-type=none

Update: given the number of upvotes, this looks like a confusing error message so I've opened #9284 to improve it.

Share:
30,510
Stephen Isienyi
Author by

Stephen Isienyi

Updated on July 12, 2022

Comments

  • Stephen Isienyi
    Stephen Isienyi almost 2 years

    What does this spring boot start up error mean?

    2016-07-04 21:53:53 [restartedMain] ERROR o.s.boot.SpringApplication - Application startup failed    org.springframework.beans.factory.BeanCreationException: Error creating bean with name org.springframework.boot.autoconfigure.session.SessionAutoConfiguration$SessionRepositoryValidator': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: No session repository could be auto-configured, check your configuration (session store type is 'null')
    
  • Stephen Isienyi
    Stephen Isienyi almost 8 years
    Got it. This is a modification to the way that spring sessions originally operated. link. Applying your advise works.
  • Dr4gon
    Dr4gon over 7 years
    Just an addition: Set this property in your application.properties.
  • Stephane Nicoll
    Stephane Nicoll over 7 years
    Why? You can set that property anywhere where boot is looking. It could be a command-line switch, a system property or whatever else. I agree that you probably want to put it there in this case though.
  • Hassan Faghihi
    Hassan Faghihi over 7 years
    what is a store type? is it a name of DB we gonna use? for example i have to tell it if i use embeded hsqldb, or postgres, or as redis(i think i saw it's name in nosql db list) or etc? and any thing it is, how we do that?
  • kometen
    kometen over 7 years
    Thank you. Or set it to jdbc as per docs.spring.io/spring-boot/docs/current/reference/html/… if the database is configured and ready.