aabiral poudel
aabiral poudel

Reputation: 47

Grails Springsecurity

I am developing an application using Grails.

I have been facing a problem,whenever i make some changes in domain classes the application automatically re runs and when i try to refresh the page i receive access denied page and the log shows user Id is null.
here is the log

Authentication attempt using org.springframework.deerwalk.impl.CustomCasAuthenticationProvider

groovy.lang.MissingMethodException: No signature of method: static com.usermanant.User.get() is applicable for argument types: (java.lang.Long) values: [1]
Possible solutions: getId(), wait(long), setId(java.lang.Long), getAt(java.lang.String), grep(java.lang.Object), wait()
 User:null

Please Help me.

Upvotes: 0

Views: 154

Answers (2)

Jakabfi Attila
Jakabfi Attila

Reputation: 367

In your Config.grooy (under Configurations) you have these lines:

grails.plugins.springsecurity.userLookup.userDomainClassName = 'com....User'
grails.plugins.springsecurity.userLookup.authorityJoinClassName = 'com....UserRole'
grails.plugins.springsecurity.authority.className = 'com....Role'

You should have the correct class names here.

In your case:

grails.plugins.springsecurity.userLookup.userDomainClassName ='com.usermanant.User'

Upvotes: 0

Chris
Chris

Reputation: 8109

If you use in-memory database, your existing items will be deleted whenever you make changes to your domain model.

If you want to, you can insert your minimum Set of data into the bootstrap.groovy.

Hot replacing with real database like MySQL usually also requires restart of your application.

Upvotes: 2

Related Questions