Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEC-2851: java.lang.NoClassDefFoundError: org/springframework/dao/DataAccessException on configuring http.rememberMe() #3073

Closed
spring-projects-issues opened this issue Feb 16, 2015 · 1 comment
Assignees
Labels
in: web type: bug type: jira
Milestone

Comments

@spring-projects-issues
Copy link

spring-projects-issues commented Feb 16, 2015

Fedor Belov (Migrated from SEC-2851) said:

I use spring-boot-starter-security 1.1.8.RELEASE + mongodb. When I try to configure http.rememberMe().tokenRepository(tokenRepository).tokenValiditySeconds(60*60*24); Spring throws an exception:

Caused by: java.lang.NoClassDefFoundError: org/springframework/dao/DataAccessException
    at org.springframework.security.config.annotation.web.configurers.RememberMeConfigurer.createPersistentRememberMeServices(RememberMeConfigurer.java:316)
    at org.springframework.security.config.annotation.web.configurers.RememberMeConfigurer.createRememberMeServices(RememberMeConfigurer.java:289)
    at org.springframework.security.config.annotation.web.configurers.RememberMeConfigurer.getRememberMeServices(RememberMeConfigurer.java:259)
    at org.springframework.security.config.annotation.web.configurers.RememberMeConfigurer.init(RememberMeConfigurer.java:196)
    at org.springframework.security.config.annotation.web.configurers.RememberMeConfigurer.init(RememberMeConfigurer.java:76)
    at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.init(AbstractConfiguredSecurityBuilder.java:367)
    at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.doBuild(AbstractConfiguredSecurityBuilder.java:320)
    at org.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:39)
    at org.springframework.security.config.annotation.web.builders.WebSecurity.performBuild(WebSecurity.java:293)
    at org.springframework.security.config.annotation.web.builders.WebSecurity.performBuild(WebSecurity.java:74)
    at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.doBuild(AbstractConfiguredSecurityBuilder.java:329)
    at org.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:39)
    at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain(WebSecurityConfiguration.java:92)
    at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$19a4159a.CGLIB$springSecurityFilterChain$2(<generated>)
    at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$19a4159a$$FastClassBySpringCGLIB$$207e7f32.invoke(<generated>)

Temporary solution: add "org.springframework:spring-tx" dependency. But I dont use SQL so I don't need spring-tx. Please decouple spring-security and spring-tx

@spring-projects-issues
Copy link
Author

spring-projects-issues commented Apr 21, 2015

Rob Winch said:

Thanks for the report. This is now fixed in master and 3.2.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web type: bug type: jira
Projects
None yet
Development

No branches or pull requests

2 participants